Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Is rsync on the destination end running as a user with permission to chmod those files? –  harrymc Jun 19 '13 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). –  user50881 Jun 20 '13 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 '13 at 9:18

2 Answers 2

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.

share|improve this answer

Have a look at "dd" instead.

OS X dd command

Using dd in Mac OSX

share|improve this answer
    
Sorry, but this is just wrong and doesn't even answer my question. dd deals with the content of the file, not ACLs and other metadata. –  Nikola Knezevic Aug 14 '13 at 8:46
    
dd deals with the file system, not the content of the file system. It will replicate the entire contents. You operate on it at a volume level, not a file level. –  sweetfa Aug 14 '13 at 8:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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