Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Ease Time Machine networked backups System 10.5
A huge problem in 10.5 is starting multiple networked backups over a relatively slow network -- things just take forever.

To alliviate this, first mount the backup disk on each machine via AFP. Choose that disk in the Time Machine System Preferences panel, start a backup, and then stop it right after it starts. You will have to wait while it creates a sparsebundle over the network. Repeat with each machine.

Once the sparsebundles for all the machines you want to backup have been created, you can bring the external drive to each machine for the initial backup, and it will automatically use that sparsebundle. Once you've done that for each machine, put the drive back on the network, and enjoy not having to wait 10 days to back up over your slow wireless.
    •    
  • Currently 3.00 / 5
  You rated: 4 / 5 (6 votes cast)
 
[28,488 views]  

10.5: Ease Time Machine networked backups | 7 comments | Create New Account
Click here to return to the '10.5: Ease Time Machine networked backups' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Ease Time Machine networked backups
Authored by: dbs on Nov 26, '07 08:14:13AM
Do the Time Machine sparsebundles work better over AFP than they do over SMB? Since Apple lists this as supported I would hope the answer would be yes, but I'm a bit worried since I don't see why the SMB version wouldn't work and the AFP one would. (Same file access semantics for the bands in the sparsebundle as far as I can tell.)

E.g.: http://discussions.apple.com/thread.jspa?messageID=5918065#5918065

Apparently when the backup fills up on an SMB share, Time Machine can not delete the old backups so it ends up deleting all the old backups. If this works better over AFP then that would be great.

[ Reply to This | # ]
10.5: Ease Time Machine networked backups
Authored by: felix-fi on Nov 27, '07 06:01:35AM

I am the poster of this apple discussion message. I am still puzzled by the fact that nobody else has run in the same pb than me (i.e. filling up the SMB partition, which leads TM to delete all but one backups).

In any case, Leopard is able to recover "free bands" from a sparsebundle over SMB using hdiutil compact... but not while deleting backups.

One could imagine that the situation is different with AFP, maybe bands are freed right away?



[ Reply to This | # ]
10.5: Ease Time Machine networked backups
Authored by: rjbailey on Nov 26, '07 10:48:40AM

Great hint. Could have used it yesterday. What does NOT accomplish what you succeeded at doing is to mount the disk locally for the first backup and then access it over the network for later backups. I assumed this would work, and when it didn't I did a new initial backup by wiring the computer to our GB network for a wired backup. Subsequent backups over wireless are plenty speedy enough.



[ Reply to This | # ]
10.5: Ease Time Machine networked backups
Authored by: martinwennerberg on Nov 26, '07 12:46:24PM

A simple and quick way if you have one or more portable computers that back up to a stationary server is to connect an ethernet cable directly between the server and the client during the first backup. The default network settings are to use the cable rather than wireless if available so normally you need no extra configurations except the normal mount of the disk.



[ Reply to This | # ]
10.5: Ease Time Machine networked backups
Authored by: Fisslefink on Apr 03, '08 09:56:34AM
Thanks, that tip worked for me.

However, I ran into a few problems along the way, mostly having to do with incompabilities between the way linux and OS X see files. Because there is a lot of confusion on the internet about how to set up Time Machine over the network, I'm offering my findings below. I don't claim that they're perfect, so if you find a discrepancy, please post a correction.

----------------

Terminology: I make frequent use of the phrases <ComputerName> and <en1MacAddress>
...these refer to the mac address of en1 on the OS X box (under System Preferences -> Networking -> Advanced) and the name of the OS X box (under System Preferences -> Sharing). If you're copy/pasting from these notes, do not include the ''<" or ">" characters.
...also my partition is named "MyBookPartition" ...If you're using the commands below, that's another thing to change according to your setup.


My setup:
OS X Leopard 10.5.2 and the March 20th update that allows Time Machine to backup to an Airport Extreme
WD MyBook Pro 1TB external drive with "Case-sensitive HFS+" filesystem
Ubuntu 7.04 (Feisty Fawn) sharing the drive over AFP using netatalk 2.0.3

---------------

Notes on setting up Time Machine backups on an external drive with Ubuntu 7.04 (Feisty Fawn) and AFP sharing using netatalk:

1) The SystemPreferences tweak. I started playing with Time Machine over a network long before the March 20th update that allowed Time Machine to back up to a hard drive plugged into an Airport Extreme. Consequently, I had already run the infamous command "defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1" from terminal. To check if this setting was still in place after the update, I ran "defaults read com.apple.systempreferences TMShowUnsupportedNetworkVolumes". The output was "1", suggesting that the setting still exists and it is still enabled (some people have reported that this option is completely gone). I don't know if the March 20th update makes this tweak redundant. I just ran the command "defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1" again for the sake of getting these things working. Note that this command should be run WITHOUT SUDO for it to work.

2) Filesystem. The filesystem on the external hard drive partition must be writable by OS X and Linux. Ext3 did not work for me because "ext2fsx" on sourceforge is unreliable. If ext2fuse for OS X matures, then an EXT3 filesystem may work. In the meantime, only an hfsplus (case sensitive, no journal) partition should be used. Ubuntu supports reading and writing from this filesystem type using the 'hfsplus' and 'hfsutils' packages. Create the partition with Disk Utility in OS X, not using hfsplus-utils in linux.

3) Initial remote backup. Share the drive as an AFP share from the linux box. Mount the AFP share with Finder on the OS X box (Go --> Connect to server). In Time Machine preferences, use "Change disk" to select the shared disk. Start backup. While Time Machine is "Preparing", you must rudely disconnect the network share from the linux side using '/etc/init.d/netatalk stop' ...Telling Time Machine to stop 'preparing' causes it to clean up after itself, deleting the sparsebundle. We don't want this.

4) Hidden files. While it's "preparing" the AFP share, TM makes a sparsebundle file named <ComputerName>_<en1MacAddress>.sparsebundle and a hidden file named .<en1MacAddres> However, linux screws up the '.' and stores it as ':2e' on the linux filesystem. When running TM over the network, the file must be named :2e<en1MacAddress> for it to be recognized remotely and for TM to open the sparsebundle. When running TM locally, the file must be *renamed* to .<en1MacAddress> for TM to work.

In other words, for TM to work remotely with the drive attached to the linux box you should have:
(ls -la run from linux on the external drive) :2e<en1MacAddress>
(ls -la run from OS X on the mounted AFP share) .<en1MacAddress>
And for TM to work locally with the drive attached to the OS X box you should have:
(ls -la run from OS X on the external drive) .<en1MacAddress>

If all else fails, or you deleted the hidden file, and you need to start again

5) Your other files. Your other files (ie. music, movies, etc.) will be **preserved** on the partition when you select a network share using "change disk" in TM. It will ignore them and make its own sparsebundle to store the backups. When mounted locally, your other files will be preserved if the <ComputerName>_<en1MacAddress>.sparsebundle file is **already present**. If there is no .sparsebundle file present, and you select the partition with "Change Disk", Time Machine pop up a warning that asks to use the whole partition --- if you say OK, this **WILL** erase your data.

6) Starting the local backup. Connect the firewire drive to the OS X box. Allow the hfsplus partition to mount, but DO NOT MOUNT THE SPARSEBUNDLE using Finder. Only mount the drive that *contains* the sparsebundle. Using terminal, rename the file ":2e<en1MacAddress>" to ".<en1MacAddress>"

cd /Volumes/MyBookPartition
mv \:2e<en1MacAddress> .<en1MacAddress>

Now use "Change disk" within TM to force it to recognize the drive locally. A full backup should occur. When it's finished, plug it back into the linux box.

7) Permissions. When run locally, TM likes to 'own' the sparsebundle, setting permissions (eg. 99:501) on all of the bands. For these to be writable by linux they must be owned by the linux user. After you're done using the drive locally on the Mac, transfer it back to the linux box. From the root of the mounted partition in Linux, run:

cd /media/MyBookPartition
sudo chown -R <your ubuntu username>:<your ubuntu username> <ComputerName>_<en1MacAddress>.sparsebundle

TM also likes this file to have the SetGID bit enabled on the .sparsebundle directory and on '.AppleDouble' one level below it. If it gets messed up, run:

cd /media/MyBookPartition
sudo chmod 2700 <ComputerName>_<en1MacAddress>.sparsebundle' and then '<ComputerName>_<en1MacAddress>.sparsebundle/.AppleDouble

8) Accessing the sparsebundle remotely. If the sparsebundle shows up as a "Sparse Disk Image Bundle" in Finder, try to mount it. Did it work? Great UNMOUNT IT and jump to #9, below.

However, if you're like me, finder just shows the sparsebundle as a blue folder. Double-clicking it in Finder shows the files it contains:
bands
Info.bckup
Info.plist
token

The problem is that the extended attribute that tells OS X this is a 'sparsebundle' and not a 'folder' was lost. Attempting to fix the extended attributes with "setfile -a B <ComputerName>_<en1MacAddress>.sparsebundle" using OS X's setfile tool does not work, since setfile can't set extended attributes over a network. Instead you must fix it from the linux side. Alas, linux does not have a tool for this. So we'll do a bit of a 'shell game' with a sparsebundle that has the correct attributes.

Do the following:
- In OS X, run the command below create a new sparsebundle with the same attributes as the TM backup sparsebundle, but a different name:
sudo hdiutil create -size 80g -type SPARSEBUNDLE -nospotlight -volname "TMbackup" -fs "Case-sensitive HFS+" -verbose ~/Desktop/temp.sparsebundle
- Using Finder, copy the new temporary sparsebundle file from your OS X desktop to the AFP mounted network share. It's only about 60 MB, and should take about a minute to transfer.
- Now you have a sparsebundle on the AFP share with the correct 'extended attributes' named temp.sparsebundle. In linux, move everything from the <ComputerName>_<en1MacAddress>.sparsebundle directory to the temp.sparsebundle directory:
'mv -v <ComputerName>_<en1MacAddress>.sparsebundle/* temp.sparsebundle/'
and then rename the old sparsebundle file:
'mv <ComputerName>_<en1MacAddress>.sparsebundle badattributes-<ComputerName>_<en1MacAddress>.sparsebundle'
and finally rename the temp sparsebundle file to the correct name to be recognized by TM:
'mv temp.sparsebundle <ComputerName>_<en1MacAddress>.sparsebundle'

9) Remote backup with TM. Once the sparsebundle is recognized as a "Sparse Disk Image Bundle" in Finder, TM will be able to mount it and perform an incremental backup. At this point, the AFP share should be mounted in Finder, but the sparsebundle should NOT BE MOUNTED. Open TM Preferences and use "Change disk" to select the AFP share. Don't worry, it won't erase the sparsebundle that took you hours to create! After a few seconds of "preparing" it will perform an incremental update to the backup you made when the drive was physically attached to the OS X computer (mine only had 10MB to update, which took about a minute over 802.11g wifi).

10) The big test. Now try renaming a non-precious file and restoring the original it from Time Machine (by running Time Machine from your Applications folder.)

Credits:
sirozha at http://www.readynas.com/forum/viewtopic.php?f=28&t=15271&st=0&sk=t&sd=a&start=120
thesolonoid at http://www.macosxhints.com/article.php?story=20071110145136486
Engadget at http://www.engadget.com/2007/11/10/how-to-enable-time-machine-on-unsupported-volumes/

[ Reply to This | # ]
10.5: Ease Time Machine networked backups
Authored by: Fisslefink on Apr 03, '08 09:57:16PM

Correction: All mentions of "en1" in my previous post should be "en0", in other words, the MAC address of your wired ethernet card.

Sorry about that!



[ Reply to This | # ]
10.5: Ease Time Machine networked backups
Authored by: Fisslefink on Apr 04, '08 08:31:34AM

Correction: All mentions of "en1" in my previous post should be "en0", in other words, the MAC address of your wired ethernet card.

Sorry about that!



[ Reply to This | # ]