Reference

isExcludedFromBackup

isExcludedFromBackup is a per-file URL resource key on iOS that marks a file or folder so iCloud and iTunes/Finder backups skip it, keeping regenerable caches and downloads out of the user's backup.

iOS developmentiOSiPadOS

isExcludedFromBackup

Also known as: exclude from icloud backup, skip backup attribute, ios exclude from backup

isExcludedFromBackup is a per-file URL resource key on iOS that marks a file or folder so iCloud and iTunes/Finder backups skip it, keeping regenerable caches and downloads out of the user's backup.

  • Set via URLResourceValues.isExcludedFromBackup and url.setResourceValues().
  • Files in the Caches directory are excluded from backup automatically.
  • Apple requires regenerable or re-downloadable data to be excluded from iCloud/Finder backups.

How to set it

You set it through a file URL's resource values. In Swift you fetch a mutable URL, assign `var values = URLResourceValues()`, set values.isExcludedFromBackup = true, then call url.setResourceValues(values). The flag is stored as the extended attribute the system reads at backup time, and it applies to the file or the entire directory you point it at.

Apple's guidance is that files which can be re-downloaded or regenerated should not be backed up. Anything in the Caches directory is already excluded automatically, so the attribute matters most for regenerable data you keep in Documents or Application Support -- for example a downloaded media cache you deliberately store outside Caches so iOS does not purge it under storage pressure.

Why it matters

Backups have a size budget. iCloud storage is limited, and a backup bloated with regenerable downloads makes restores slower and can push users over their iCloud quota. Excluding regenerable files keeps backups lean and avoids App Store review rejections, which flag apps that store large non-essential data in backed-up locations.

From a cleanup standpoint, files marked excluded from backup are exactly the kind of disposable, app-managed data a cleaner like Cleanor highlights -- they take up local space but are not precious, so they are safe candidates to clear when you need room.

Related terms

Keep reading the reference.

Act on it

Guides and tools for this topic.