NOTE: The following is not about backup, but cp/rsync like tools.
Links
- asr
- In device mode, it is as good a low level duplicate of the disk as you can get.
- ditto
- rsync
can do it too – but remember to pass the
-Eflag-E, --extended-attributes→ copy extended- Try this using the macports version of rsync:
sudo $RSYNC -avNHAX --protect-args --fileflags --force-change --rsync-path=$RSYNC SRC_DIR/ DST_DIR/attributes, resource forks. e.g. Passrsync -aEx …. - However, this has to be the OS X rsync. The GNU
version uses
-Eto mean "preserve executability" or something like that.
- hdiutil
- e.g.
sudo hdiutil create ~/backup.dmg -format UDZO -nocrossdev -srcdir ~/dir_to_backup
- e.g.
- Try to preserve:
- ownership, permissions, creation and modification times
- Finder flags and Finder comments
- Finder locked flag
- BSD flags, symlink ownership, extended attributes
- See also:
- n8gray/Backup-Bouncer
- A metadata test suite for OS X backup tools – http://n8gray.org/code/backup-bouncer
- Make Back Ups from the Command Line in Mac OS X with These 4 Tricks
- Mac Tips: Guide to Backing Up Mac OS X
- (2006) Are you copying all the information about your files that you need?
- Dated article but it seems to show that Finder preserves the most information. (Obviously, asr in device mode beats that.)
- n8gray/Backup-Bouncer
n8gray/Backup-Bouncer results
Winner: macports rsync
RSYNC=/opt/local/bin/rsync sudo $RSYNC -avNHAX --protect-args --fileflags --force-change --rsync-path=$RSYNC SRC_DIR/ DST_DIR/
Results
Sat 20:40:54 2014-09-27 @cheshire: [g:Backup-Bouncer master] // % sudo ./bbouncer copy -d /Volumes/tstSrc /Volumes/tstDst
src = /Volumes/tstSrc
dst = /Volumes/tstDst
Enabling owners on src/dst disks
/dev/disk5s1 on /Volumes/tstSrc (hfs, local, journaled)
/dev/disk6s1 on /Volumes/tstDst (hfs, local, journaled)
Cleaning.........
Copying with: rsync-apple ...
^CFAIL
Copying with: rsync-macports ... ok
Copying with: rsync-fink ... Skipping: can't find needed files
ok
Copying with: cp-apple ... ok
Copying with: ditto ... ok
Copying with: tar ...
ok
Copying with: pax ... ok
Copying with: xar-apple ... ok
Copying with: xar-svn ... Skipping: can't find needed files
ok
------------------ rsync-apple ------------------
This copier exited with error code 20
This copier produced log output in:
/Volumes/tstDst/10-rsync-apple/log
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... FAIL (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... FAIL
Verifying: creation-date ... FAIL
Verifying: bsd-flags ... FAIL
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... FAIL
Sub-test: lots of metadata ... FAIL
------------------ rsync-macports ------------------
This copier produced log output in:
/Volumes/tstDst/15-rsync-macports/log
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... ok (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... ok
Verifying: creation-date ... ok
Verifying: bsd-flags ... ok
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... ok
------------------ rsync-fink ------------------
This copier was skipped
------------------ cp-apple ------------------
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... FAIL (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... FAIL (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... ok
Verifying: creation-date ... FAIL
Verifying: bsd-flags ... ok
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... FAIL
------------------ ditto ------------------
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... ok (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... ok
Verifying: creation-date ... FAIL
Verifying: bsd-flags ... ok
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... FAIL
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... ok
------------------ tar ------------------
This copier produced log output in:
/Volumes/tstDst/50-tar/log
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... ok (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... ok
Verifying: creation-date ... FAIL
Verifying: bsd-flags ... ok
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... FAIL
------------------ pax ------------------
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... FAIL
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... ok (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... FAIL
Verifying: creation-date ... FAIL
Verifying: bsd-flags ... FAIL
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... FAIL
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... ok
------------------ xar-apple ------------------
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... ok (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... ok
Verifying: creation-date ... FAIL
Verifying: bsd-flags ... ok
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... FAIL
------------------ xar-svn ------------------
This copier was skipped
S