Backing up and cloning OS X

Status
Not open for further replies.

hemant_mathur

-- No Easter Eggs here --
Source : *xanana.ucsc.edu/xtal/backup_X_and_fink.html

Backing up, restoring and installation cloning on OS X:
There are two types of filesystem disk formats we need to worry about, HFS+, which is the default OS X filesystem format, and UFS, which is the "normal" unix file system format. All of the standard unix utilities are designed to cope with UFS. They will work on HFS+, but they will break what are called "resource forks" because this is a unique structure to HFS+. So, for example, if you back up or copy with normal unix utilities a carbon application or a file having an icon, you may find that it will break the application or make the icon disappear. In some cases, this could create a genuine problem. At the very least it will lead to annoyances like losing the information that tells OS X which application to use to open a particular file.

How you do your backups will determine what backup utilities you need to use.
A. Backing up HFS+ filesystems with resource forks. (This is a more compehensive backup procedure in that you can do it all this way).
1. If you want to back up OS X files, applications, etc, to another OS X HFS+ disk, either on your machine, or remotely, you can:

a. Mount the other computer or external drive and manually drag and drop files in the finder window. This will give you exact copies of your files on the target backup HFS+ formatted disk.

b. Use OSX-specific copying programs like CpMac, psync, or ditto, as described in the HFS+ link above. Each of these procedures will give you exact copies of your files on the target backup HFS+ formatted disk. psync allows you to do incremental backups, copying only what has changed between the source and target directories.


c. Use OSX-specific archiving software like hfspax or hfstar. These create a compressed archive of your files that you can copy and store on ANY unix disk and that can then be expanded on an HFS+ formatted disk.

d. Use Carbon Copy Cloner, which is a donation-ware GUI wrapper for psync and ditto. It allows you to make a bootable clone of your startup disk and makes automated updates extremely straightforward and easy to implement. The author insists that academic users not pay for this.
2. If you want to back up OS X files, applications, etc, to a standard Unix File System (UFS) formatted disk, you need to use the OSX-specific archiving software like hfspax or hfstar. These create a compressed archive of your files that you can copy and store on ANY unix disk and that can then be expanded on an HFS+ formatted disk. You cannot expand them (without corruption) on UFS disks.

B. Backing up normal unix files. (This is a more protable backup procedure).
3. If you want to back up "normal" unix files (i.e, most crystallographic softwware, input and output, all ascii text, everything in /sw and /usr/local), you can either use the above tools, or you can use the standard unix equivalents (cp, tar, etc.) You can use these procedures to back up everything. In other words, you can't hurt a normal unix file by backing it up with all of your other OSX files. However, this may be overkill, so you might prefer to back up normal unix files using the normal procedures. The advantage of the latter is that you can then unpack and read these files on any unix file system. That is why I am including them both

Again, this procedure will only back up normal unix files correctly. It will not honor resource forks.

C. Mounting disks from remote computers onto Mac OS X.

1. NFS mounting of remote UFS disks.

If you are backing up to UFS disks mounted on non-OS X unix computers (SGI, Linux, etc.), or simply need to access these disks for data, etc, I think the most simple and stable way to do this is with NFS. It is likely how you do things on the other unix machines you might have, so it is easiest to get your Mac to play by the established rules.
By far the most straightforward way of handling this is to get ahold of NFS Manager, donation-ware that provides a convenient interface for setting up both NFS mounts and NFS exports. If you can live with automounter, which is on by default, this will get you going without complications within minutes. The documentation is superbly written.

I've put further details in the linked page in Part A. These include instructions on how to bypass automount, which I found was necessary to get automated backups to work at 3 am when I am logged out, and how to coordinate file read/write permissions and ownership, which is also crucial to suscess.
 
Status
Not open for further replies.
Top Bottom