Backing up OS X with a freeware AppleScript
Apr 23, '02 08:47:58AM
Contributed by: binkybob
I've written an applescript (osxcopy_v61, available on my iDisk) to handle the following tasks:
- Copies OS X system folders and files from one location to another
- Makes a bootable copy of an OS X volume
- Preserves all privileges and recreates necessary symbolic links
- Deletes selected visible and invisible OS X files and folders
- Can copy to another volume, another partition or another folder of same drive
- Creates a log on the destination to report outcome of copy
- Overcomes 4GB limitation of Apple Software Restore for making a backup
An extremely important point to remember when copying to another drive in OS X (whether you're using this script or using the terminal) is the permission setting on the destination drive. Do this before copying:- Show Info on the secondary drive (destination for the copy)
- Go to the Privileges section of the Show Info dialog
- Uncheck the box labeled "Ignore privileges on this volume"
If you do not uncheck this setting then everything copied to the secondary drive will have "Owner" set to the current user and "Group" set to unknown. You might be able to boot with the wrong privileges but many system level services will be broken.
Read the rest of the article for an important warning about folders that will be deleted on the destination prior to creating the backup...
WARNING
=======
To make sure that the data copied onto the destination is consistent with the source of the copy, OSXCOPY deletes the same named folder at the destination before beginning the copy sequence (e.g. If you choose to copy the Library folder from the source disk to a destination which also contains a Library folder OSXCOPY will delete the Library folder on the destination before starting the copy). OSXCOPY is not an incremental backup program like Dantz Retrospect. It copies selected items wholesale.
This script was written to make my life working with OS X easier. I don't need it often but in those emergency situations when copies are required then it has turned out to be quite useful. I would welcome feedback directly or on this thread.
[Editor's note: I have not tried this script myself, but thought it may be of general interest given the importance of backing up your system. The script is viewable (with comments) in ScriptEditor, so you can see exactly what it does prior to running it.]
Comments (1)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020423084758164