How do I copy the content of a whole disk on OSX 10.3
I would like to copy the contents of a whole disk into another folder on an external drive.
it should preserve permissions and timestamps.
on linux i use cp -a
but on OSX it seems to be different
cp -a
is just a shortcut for cp -pPR
, these options are available in the 10.3 version of cp already. So you can copy the content of your disk with
cp -pPR /old/path /Volumes/new/path
You can also avoid using Terminal altogether and just drag the top folder you want to keep onto the external drive in Finder.
Download Carbon Copy Cloner 2.3. It is compatible with your version of MacOS X and processor. This solid software will preserve all the ACL, all the permissions and all the hidden files of your whole file system.
Once you have made your external copy, check it with the original Disk Utility
.
Don't use a more recent version of Disk Utility
which will want to fix many discrepencies…
which aren't.
If you want to take a backup of your whole disk, while maintaining permissions, ACLs, timestamps, symlinks, etc... I would recommend to use tar
instead of cp
.
Something like this:
tar cjvf mybackup.tar.bz2 <source>
and then extract the tar file in another location
tar xjvf mybackup.tar.bz2
To avoid the temporary file (which may be quite big) you can pipe them together
cd /path/to/source; tar cf - . | (cd /path/to/dest; tar xpf -)
Of course, if you are backing-up file a filesystem, shared by several users, you may need to do so as a root to overcome permissions problems.