File copying/synchronization software and your metadata (and data!)
Following up on my earlier test of Mac archiving software, I decided to test some popular file copying/synchronization software to see which of these programs kept metadata and other Mac/HFS+ attributes intact. Rather than do a comprehensive test, I tried some popular utilities which seem to cover the general breadth of the software and which are particularly popular or prevalent. I also wanted to catch programs which had been updated since this article was written a year ago.
If you want detail on other utilities, I recommend reading the article linked above, or doing your own tests if you have the time. (And please let us know what you find out!)
The Utilities
The Finder: I just did a simple copy from one disk image to another. Drag and drop. For what it’s worth, an AppleScript copy via The Finder has the exact same results.
Disk Utility: Disk Utility does a pretty good job when making an image from a device, but I was more curious about how it would do making an image from a folder. So I simply chose “New Image From Folder…” and let ‘er rip.
cp: The venerable copy command on the command line. Apple’s updated it to respect resource forks and other metadata.
hard link: This is simply using the ln command or the Gnu cp command to create a separate instance in the logical directory of a file. This is a way to make a file literally exist in two places, where neither version is a pointer or alias to the other. This can be done with the ln command or the Gnu cp command (part of the gnu coreutils).
rsync: Rsync is a great and lightning fast synchronization utility that’s at the core of many command-line backup systems. Apple’s updated it to support resource forks and whatnot, but unfortunately, they broke it in the process. I ran a patched version installed via Fink as the other version pretty much doesn’t work at all.
ditto: This is Apple’s answer to rsync, as best as I can tell, and it’s a nice way to quickly duplicate folders and files. It’s been resource-fork-aware from the start.
psync: psync is a Perl-based utility that does file synchronization similar to rsync. A few graphical clients (such as Deja Vu) use psync on the back end.
CCC 3.0 b5: Carbon Copy Cloner is a great utility for cloning your hard drive. The 3.0 branch is brand new, so I thought I’d give it a try and see how it did.
SuperDuper!: Shirt-Pocket Software’s utility is a fave among many folks who like having a bootable backup. While somewhat inflexible in how it works (it’s pretty much geared toward being a whole-drive duplicator), it’s easy to use and very reliable.
ChronoSync: ChronoSync is probably the most configurable and powerful graphical synchronization utility available for the Mac. It’s users rave about it, so I figured I’d include it in my tests.
Result of tests of file copy/synchronization software
| Tool | inode number | permissions | ACL | BSD flags | resource fork | extended attributes | type | creator | creation date | modification date | lock | stationary | invisible | label | comments |
| Finder copy | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| Disk Utility Image | N | Y | N | N | Y | N | Y | Y | N | Y | N | Y | Y | Y | Y |
| cp -r | N | N | N | N | Y | Y | Y | Y | N | N | N | Y | Y | Y | Y |
| hard link | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | N |
| rsync -aE | N | Y | N | N | Y | Y | Y | Y | N | Y | N | Y | Y | Y | Y |
| ditto | N | Y | N | N | Y | N | Y | Y | N | Y | N | Y | Y | Y | Y |
| psync | N | N | N | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| CCC 3.0 b5 | N | Y | N | N | Y | N | Y | Y | N | Y | N | Y | Y | Y | Y |
| SuperDuper! | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| ChronoSync | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
Notes:
- Finder Copies: Comments are maintained even when the invisible .DS_Store file is not copied, unlike most other techniques
- Disk Utility Image: Attempting to build an image from a folder on a volume with ACLs enabled will fail. As a result, these tests were carried out on a folder without ACLs.
- hard link: Files with the uchg flag/locked files could not be linked and were skipped
- rsync: Attributes in bold were only successfully copied from a volume with ACLs disabled. With ACLs enabled, these attributes do not copy.
- psync: Psync didn’t copy extended attributes, but it did embed the file’s type/creator information into a new extended attribute. Very strange behavior.
- SuperDuper!: SuperDuper! maintained the “arch” BSD flag on the clone. While this is not technically correct, it is thorough, and may be desirable if you want a precise clone.
- ChronoSync: ChronoSync has an option to maintain Finder comments even when you aren’t copying invisible .DS_Store files
Conclusions
Clearly, The Finder is your only free and bulletproof solution to copying files. Every command-line option, despite Apple’s efforts to make them compatible with all the fancy Mac metadata, has serious failings.
If you’re willing to spend a little money, SuperDuper!, or ChronoSync is a good option. Carbon Copy Cloner comes close, but even with its lower price (it’s donationware), SuperDuper! does a much better job and is quite reasonably priced.
Bookmark with Del.icio.us
Mac metadata
This appears to be the better place to set my comment :). I just started maintaining a wiki page detailing supported and tool support for Mac metadata on the macos-x-server mailing list wiki. It’s to note this data! Others are, of course, welcome to contribute. Would you object to me giving credit to your data if I were to integrate it?
cp flags
I’m not sure your results for cp are good. IIRC, you need to use “cp -R -p” to get it to preserve most properties. Also, what version of the OS are you using?
Hard links
Using ln (or similar) to create a hard link is not that useful given that hard links can’t exist across different partitions. All it protects against is a messed up inode entry. If say that partition is wiped out, then that’s it.
Also, how many hard links are you going to keep to a particular file? Another way to ask this question is how many different names are you going to give that same piece of data?
re: Hard links
That’s all true. Hard links are not a true copy and are therefore useless as a backup file. I’ve included them here since they do have issues with Mac metadata, given that hard links are often used in backup schemes to provide numerous snapshots of a single file without actually copying that file. (a la Time Machine)
So is Finder copy still the
So is Finder copy still the best option? Perhaps creating a sparse disk image and copying files into it with Finder is one of the better options. Just wondering; I’ll do some tests on it later…
cp Options and the new CCC 3.0.1
Your tests are extensive. But you should also be testing whether “Symlink Ownership” is being copied. A symlink can have different ownership than the file or folder it points to. To set the ownership on a symlink use “chmod -h owner:group file”. I have found that many utilities and programs do NOT copy the symlink ownership properly.
cp -r is not the right command. You should be testing “cp -Rp”.
In my test, “cp -Rp” copies everthing except “Creation Date” and “Symlink Ownership”. Depending on your perspective, the failure to copy the Creation Date may or may not be a bug.
In addition, I would like to let you know that Carbon Copy Cloner (v3.0.1) is MUCH improved. It appears to be copying BSD Flags, Extended Attributes, Locked etc. The only small bug that I have encountered is CCC 3.0.1 fails to copy extended attributes if the file is also locked. It looks like CCC 3.0.1 is copying the file and then locking it too early before the extended attributes get copied. (If the destination file is locked, you can change it or set extended attributes). I hope Mike fixes this soon.
The other great Apple tool to backup file is Apple’s asr. I do hope you test it in your next round of tests.
But my initial tests are not encouraging. asr in file copy mode fails in many areas:
Come on Apple. Fix these long standiing bugs!
thanks for your hard work.
thanks for your hard work.
thanks for your hard work.
thanks for your hard work.
thanks for your hard work.
thanks for your hard work.
good job man keep it
good job man keep it up cheapest car insurance
sdqw
To the world you may be one person, but to one person you may be the world. 张家界旅游
张家界旅游景点
自驾游
张家界风光
户外
张家界旅游网友情连接
thanks of post
thanks of post
Good post! I should archive
Good post! I should archive my files on my mac. I had a previous incident where i lost all my music and pictures…it was so devastating.
auto insurance
Good post! I should archive
Good post! I should archive my files on my mac. I had a previous incident where i lost all my music and pictures…it was so devastating.
auto insurance
good information to know. i
good information to know. i should archive my files on my mac. i had an incident where i lost all my files..its was truly sad!
auto insurance
good information to know. i
good information to know. i should archive my files on my mac. i had an incident where i lost all my files..its was truly sad!
auto insurance
good information to know. i
good information to know. i should archive my files on my mac. i had an incident where i lost all my files..its was truly sad!
auto insurance
wwwwww
北京专业数据恢复公司,共同数据恢复出完美数据。硬盘数据恢复技术太完美了。中国留学行业,提供数据恢复服务,现在很多RAID数据恢复都多。而且硬盘修复公司也多。但是上海数据恢复很少。杭州数据恢复却很多。小贩展示货架,热爱硬盘数据恢复。我们的硬盘修复复第一。我们的月饼美味。维护硬盘数据恢复永远第一。RAID数据恢复原来也这么容易。
wwwwww
北京专业数据恢复公司,共同数据恢复出完美数据。硬盘数据恢复技术太完美了。中国留学行业,提供数据恢复服务,现在很多RAID数据恢复都多。而且硬盘修复公司也多。但是上海数据恢复很少。杭州数据恢复却很多。小贩展示货架,热爱硬盘数据恢复。我们的硬盘修复复第一。我们的月饼美味。维护硬盘数据恢复永远第一。RAID数据恢复原来也这么容易。
There was another post I read
There was another post I read awhile ago on another site that helped me in the same way yours has helped take me to the next step.
Thanks!
笔记本维修 笔记本电脑维修 联想笔记本维修 华硕笔记本维修
笔记本维修 笔记本电脑维修 联想笔记本维修 华硕笔记本维修 HP笔记本维修 索尼笔记本维修 IBM笔记本维修 sony笔记本维修 DELL笔记本维修 北京笔记本维修 中关村笔记本维修 RAID数据恢复 硬盘数据恢复 电脑数据恢复 笔记本数据恢复 数据恢复 移动硬盘数据恢复 RAID数据恢复 硬盘数据恢复 电脑数据恢复 笔记本数据恢复 数据恢复 移动硬盘数据恢复 U盘数据恢复 RAID数据恢复 硬盘数据恢复 电脑数据恢复 笔记本数据恢复 数据恢复 移动硬盘数据恢复 U盘数据恢复
Post new comment