Repository navigation
Exclude application data directory from backups - #1660
somiljain2006 wants to merge 19 commits into
Conversation
|
@jglogan @katiewasnothere @realrajaryan Can you review this pr? |
c6b50c0 to
27af44b
Compare
|
@dkovba CI failure appears unrelated to this change. |
|
@dkovba, I have addressed the changes. Can you review them |
dkovba
left a comment
There was a problem hiding this comment.
Thank you for the contribution 👍
|
@dkovba Can this be merged? |
dkovba
left a comment
There was a problem hiding this comment.
Sorry for the delay. Please consider additional feedback.
Code Coverage
|
dkovba
left a comment
There was a problem hiding this comment.
Users should be able to change which folders are excluded from backup, so we shouldn't overwrite that choice on every start. Set the exclusion only when a folder is first created.
|
|
||
| do { | ||
| let appRootURL = URL(fileURLWithPath: appRoot.string) | ||
| try FileManager.default.createDirectory(at: appRootURL, withIntermediateDirectories: true) |
| //===----------------------------------------------------------------------===// | ||
|
|
||
| import Foundation | ||
| import Logging |
There was a problem hiding this comment.
Are we supposed to have a test here?
|
|
||
| try FileManager.default.createDirectory(at: containerRoot, withIntermediateDirectories: true) | ||
|
|
||
| do { |
There was a problem hiding this comment.
It seems this hasn't been addressed: #1660 (review)
|
Closed in favor of #2412. |
Type of Change
Motivation and Context
[Why is this change needed?]
Fixes #1554
The application data directory (~/Library/Application Support/com.apple.container) can contain large, sparse files whose apparent size is significantly larger than their allocated size. This may cause backup tools to process unnecessary data or fail when backing up the container application data.
This change marks the application root directory with URLResourceKey.isExcludedFromBackupKey, preventing it from being included in backups while preserving normal container functionality.
Testing
Automated Testing:
Manual Verification: