10

Recently I had to change my Mac's filesystem from case-preserving to being fully case-sensitive. I did that by using CCC and copying data to another disk, then returning back to newly formatted main disk.

Now, I wanted to do the Time Machine backup on my old Time Machine disk, that is hosted on my FreeBSD based NAS, exported through AFP. However, I'm getting an error that filesystems do not match, as Time Machine still has non-case-sensitive fs. This time, I can't use CCC, as it doesn't support file level copy for Time Machine volumes.

Naturally, I went straight for rsync, but that raises a problem - if I run it with:

/usr/local/bin/rsync --super -aEHAXNvx --fileflags --delete /Volumes/Time\ Machine\ Backups/ /Volumes/NewDisk/

it starts complaining as soon as it hits Backups.backupdb/<machinename> folder, with failed to set permissions, operation not permitted. The problem here is copying ACLs, that are quite restrictive:

 ll -dle /Volumes/Time\ Machine\ Backups/Backups.backupdb/<machinename>/
 drwxr-xr-x@ 19 root  staff  646 Dec 23 09:38 /Volumes/Time Machine Backups/Backups.backupdb/<machinename>/
 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown

So, I removed -A from the above command, and rsync is now happily moving GBs of data.

Alas, I would like to preserve ACLs as well. Is that possible somehow? OS X doesn't have getfacl/setfacl, and I would like to avoid parsing output of ls -le. What I see as a solution here is to somehow tell rsync to apply ACLs "backwards", that is, from leaf files down to directories, but there's no option for it.

5
  • Is rsync on the destination end running as a user with permission to chmod those files?
    – harrymc
    Jun 19, 2013 at 14:37
  • This may be an obvious question, but are you sure ACL support is turned on in the destination volume? You imply that you're copying to a mac, which should, but in that case it should simply be working unless the user on that end is not the same user id # as the original files, in which case you will probably need to set that up, or switch to using root (obviously not a good thing, but takes care of the permission problem of setting ownership to someone else). Jun 20, 2013 at 10:49
  • In addition, this said user account should be defined for the target, or else the owner cannot be set.
    – harrymc
    Jun 21, 2013 at 9:18
  • Finder doesn't work in 10.15.5 currently the latest. "The operation can't be completed because you don't have permission to access some of the items." This is after being asked to supply password. That password request was 12 hours into a 36 hour copy. Thanks Apple, you suck. BTW this was two local Apple volumes, both encrypted, Case-sensitive, journaled.
    – null
    Aug 16, 2020 at 1:24
  • I'm not even sure how you got it to copy. For me it failed to opendir all the hidden folders in the Time Machine file system.
    – Robert M.
    Aug 29, 2022 at 4:46

3 Answers 3

4

Download rsync version 3 using Homebrew. Then you can try the "--acls" option. The rsync on Mac seems to have a slightly different command line syntax from other operating systems. You probably want to take a look at this link: http://nicolasgallagher.com/mac-osx-bootable-backup-drive-with-rsync/. It describes how to get rsync 3 and the command line arguments he uses.

I'm not an OSX user, but I back up my wife's Mac to a Linux server with rsync.

3

rsync, at least in OS X 10.4 and following, will transfer ACL attributes if the -E option is used. See the man page.

3

Apple currently says to use the Finder to copy Time Machine backups.

https://support.apple.com/en-gb/HT202380

My experience, in trying to copy 1TB TimeMachine backup from local disc to network disk, has been

  • rsync and asr failed with errors I couldn't work out.
  • Finder copy 1st attempt failed with a permissions error after an hour of examining what it was about to copy.
  • Finder copy 2nd attempt succeeded. I don't recall what was different. Perhaps it was just freshly remounted.
  • It took 3 days to copy 1TB.
3
  • Finder doesn't work in 10.15.5 currently the latest. "The operation can't be completed because you don't have permission to access some of the items." This is after being asked to supply password. That password request was 12 hours into a 36 hour copy. Thanks Apple, you suck. BTW this was two local Apple volumes, both encrypted, Case-sensitive, journaled.
    – null
    Aug 16, 2020 at 1:22
  • If you have the time and the patience, my next effort would be, reboot and try again. That's the best I've got. Sad isn't it? I tried asr too -- cafe-encounter.net/p3034/… Aug 16, 2020 at 19:47
  • I couldn't get rsync to work either. External drive to external drive, same permissions. Rsync threw permissions denied errors when trying to opendir the many hidden folders in the Time Machine file system.
    – Robert M.
    Aug 29, 2022 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.