Timemachine
Mac Backups
Here are the steps needed to setup timemachine on your mac to use our server.
First, ask management for an account on the timemachine server, timemachine2.lbl.gov. When this is setup, proceed with the following steps.
- On the Mac client:
Find out MAC address:
ifconfig en0 | grep ether | sed -e 's/^.*ether//g' |tr -d ':'
and find out value of hostname MyHost
hostname
Time machine will use MyHost_MACADDRESS as the identifier for the time machine disk. Create a sparsebundle virtual filesystem on a local disk (I've specified 120GB. Adjust if necessary):
hdiutil create -size 120g -fs HFS+J -volname "Backup of MyHost" MyHost_MACADDRESS.sparsebundle
- Mount the remote TimeMachine disk:
"Command-k"
Choose timemachine2.lbl.gov as the server login with your linux username and password. Select share corresponding to your username. Store your login information in your keyring to allow Time machine to automatically mount the share on demand.
- Copy the sparsebundle to the network share:
rsync -avE MyHost_MACADDRESS.sparsebundle /Volumes/USERNAME/.
- Remove the sparesbundle file from your local disk (so it doesn't get backed up!)
- You have to enable the option to use network volumes as Time Machine drives. Without it your freshly shared and advertised network volume won't show up in the disk selection dialogue in Time Machine. This is a hidden option not accessible via the graphical user interface so you have to copy & paste this in Terminal:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
- Go to Time Machine Preferences.
Select "Change Disk..." Select the remote share ("USERNAME")
- Be sure to tell Spotlight to ignore the remote "Backup of MyHost" share or it will try to index all of your remote backup files, which will take forever, and is useless anyway. It appears that recent versions of OSX are smart enough to know not to index remote files, so you may not have to do anything for this step.
The first time you run timemachine this way it will take a LONG time. This is because timemachine has to backup everything. After this first time, timemachine will only backup files that have changed since the last backup, so it will be much quicker.