Skip to content

Exclude application data directory from backups#1660

Open
somiljain2006 wants to merge 2 commits into
apple:mainfrom
somiljain2006:Container-Backup-Exclusion-fix
Open

Exclude application data directory from backups#1660
somiljain2006 wants to merge 2 commits into
apple:mainfrom
somiljain2006:Container-Backup-Exclusion-fix

Conversation

@somiljain2006

@somiljain2006 somiljain2006 commented Jun 7, 2026

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

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

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Automated Testing:

  • Added test coverage for backup exclusion behavior.
  • Verified all existing tests continue to pass.

Manual Verification:

  1. Built locally with make.
  2. Started the API server using ./bin/container system start.
  3. Verified ~/Library/Application Support/com.apple.container was created.
  4. Verified isExcludedFromBackupKey == true.
  5. Confirmed normal startup completed successfully.

@somiljain2006

somiljain2006 commented Jun 8, 2026

Copy link
Copy Markdown
Author

@jglogan @katiewasnothere @realrajaryan Can you review this pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: Exclude application data from backups via isExcludedFromBackupKey

1 participant