2

Context:

I've been backing up my MacBook Pro with rysnc (now version 3.2.3, protocol version 31) to external hard drives formatted with NTFS. I'd like to continue with this procedure if possible.

Usually, for a given macOS version, I would use the StdExclusions file located at /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist
as a starting point to decide what files/folders to exclude.

In Big Sur, this StdExclusions file doesn't seem to exist (at least not in its usual location).

Sub-questions:

  1. In Big Sur, is there a new StdExclusions file or equivalent in another location?

  2. Given the new file system (APFS with firmlinks/wormholes and things that are still mysterious to me) should I exclude /System/Volumes/Data/Users and copy /Users or the other way around, or do I need to copy both?

  3. More generally, (and more importantly and to the point than sub-question 2) how should one approach the /System/Volumes/Data directory in context with the whole system when backing up?

Context detail:

Initially when I was using rsync version 2.6.9 protocol version 29, I didn't need to include the --ignore-errors flag but with rsync 3 I found I had to add that flag, so my fundamental rsync command takes this form:

copyall() {
  rsync -aAXPvh --modify-window=1 --partial-dir=../rsync_TMP_PARTIAL --delete-after --ignore-errors "$@"
}
BDL="--backup-dir=../DeletedFiles_$(date +\%Y-\%m-\%d)"
EXC="--exclude-from=/Location/of/my/modified/custom/exclusions/file"
copyall "${EXC}" --backup "${BDL}" "${SRC_BASE}/" "${DST_BASE}"
bmike
  • 235,889
  • 1
  • Exclude everything you don't need for your disaster recovery plan! How and what do you intend to recover? 2) NTFS is not the way to go - requires additional (non-Apple) software. 3) Do yourself a favour and use Time Machine.
  • – Gilby Aug 06 '21 at 22:20
  • @Gilby, for recovery, I'd be okay with having only a copy of my unique material (and config files saved that make re-installations easy); if trouble happens, I could re-install the OS if necessary and then copy over material from my backup drive and do any remaining re-installs. I believe I chose NTFS for flexibility in being able to access my backup drives from a variety of operating systems. A few years ago I bought software (Paragon NTFS for Mac 15) that allows me to use NTFS. On their website, looks like it supports Big Sur. The question about /System/Volumes/Data/Users is important to me. – zeroparallax Aug 06 '21 at 23:20
  • One of my mistakes: looks like the -E option changed to -AX (ACL & extended attributes) between rsync version 2 and 3, so rsync -aEPvh should instead be rsync -aAXPvh. And it looks like Paragon NTFS does support extended attributes. Does this cover all APFS metadata? I don't know. – zeroparallax Aug 07 '21 at 01:58
  • 1
    You only need to backup /System/Volumes/Data, the OS itself can‘t be restored anyway and is easily reinstalled from Recovery. – nohillside Aug 07 '21 at 05:23
  • @nohillside, thanks. Could you explain how you came to this knowledge? And is there any official documentation that would confirm your knowledge? If I take your advice, it seems that the old StdExclusions file could be applied to this directory; so /.Spotlight-V100 would become /System/Volumes/Data/.Spotlight-V100 and similar for /.fseventsd, etc. I wonder though if there are new files I should be excluding particular to Big Sur. That is, what should be the standard exclusions for Big Sur? – zeroparallax Aug 07 '21 at 05:42
  • You can check if a file or directory is excluded by Time Machine by using tmutil isexcluded so, for example tmutil isexcluded ~/Library/Caches/ yields [Excluded] /System/Volumes/Data/Users/michaelr/Library/Caches – MichaelR Aug 07 '21 at 06:12
  • @MichaelRourke, thanks. You helped me discover what I think might be a precise answer to my sub-question 1, which was answered in this other apple stack-exchange post. What confuses me is that, when I perform that meta-data query, I get a list of files that only has three files outside of my /Users/<username> folder, two of those being outside the /Users folder. I expected to more of the files listed in the old StdExclusions file. I don't (yet) see a single same filename. – zeroparallax Aug 07 '21 at 07:45
  • Typo correction: "I expected to see more ..." – zeroparallax Aug 07 '21 at 19:46
  • According to various sources (including this one, Time Machine will add a .exclusions.plist file where a Time Machine backup is performed. It would be nice if someone could post an example of that. It seems that a full answer should refer to that as well as an mdfind meta-data query (as mentioned and linked above) and a reference to the contents of /Library/Preferences/com.apple.TimeMachine.plist, as described here. Still may not be exhaustive. – zeroparallax Aug 10 '21 at 23:14