Difference between revisions of "Timemachine"

From Compute
Jump to navigationJump to search
(Created page with '<h1>Mac Backups</h1> 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...')
 
Line 5: Line 5:
 
First, ask management for an account on the timemachine server, timemachine2.lbl.gov. When this is setup, proceed with the following steps.  
 
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:  
+
* On the Mac client:  
 
Find out MAC address:
 
Find out MAC address:
  ifconfig en0 | grep ether | sed -e 's/^.*ether//g' | tr -d ':'  
+
  ifconfig en0 | grep ether | sed -e 's/^.*ether//g' |tr -d ':'  
and find out value of hostname MyHost `hostname`  
+
and find out value of hostname MyHost `hostname`. Time machine will use MyHost_MACADDRESS as the identifier for the time machine disk.  
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):
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  
  hdiutil create -size 120g -fs HFS+J -volname "Backup of MyHost" \
+
* Mount the remote TimeMachine disk:
MyHost_MACADDRESS.sparsebundle  
 
# Mount the remote TimeMachine disk:
 
 
  "Command-k"  
 
  "Command-k"  
Choose timemachine2.lbl.gov as the server  
+
Choose timemachine2.lbl.gov as the server  
login with your linux username and password.  
+
login with your linux username and password.  
Select share corresponding to your username.  
+
Select share corresponding to your username.  
Store your login information in your keyring to allow Time machine to automatically mount the share on demand.  
+
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:
+
* Copy the sparsebundle to the network share:
 
  rsync -avE MyHost_MACADDRESS.sparsebundle /Volume/USERNAME/.  
 
  rsync -avE MyHost_MACADDRESS.sparsebundle /Volume/USERNAME/.  
# Remove the sparesbundle file from your local disk (so it doesn't get backed up!)
+
* 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:
+
* 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  
 
  defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1  
# Go to Time Machine Preferences.
+
* Go to Time Machine Preferences.
 
Select "Change Disk..."  
 
Select "Change Disk..."  
 
Select the remote share ("USERNAME")  
 
Select the remote share ("USERNAME")  
# Be sure to tell Spotlight to ignore "Backup of MyHost" or it will try to index all of your remote backup files, which will take forever, and is useless anyway.
+
*Be sure to tell Spotlight to ignore "Backup of MyHost" or it will try to index all of your remote backup files, which will take forever, and is useless anyway.
 
   
 
   
 
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.
 
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.

Revision as of 17:35, 25 September 2009

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 /Volume/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 "Backup of MyHost" or it will try to index all of your remote backup files, which will take forever, and is useless anyway.

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.