Time Machine On A Network Drive

Apple’s Time Machine software made setting up incremental back-ups easy, with one exception network: network drives. Time Machine only directly supports drives formatted with Apple’s HFS+J, and will eventually use all disk space on the drive. This article is an illustrated guide showing how to set up Time Machine on a network drive, using a ‘sparse bundle’ to emulate a smaller HFS+J drive.

1. Load the Terminal application. This can be found by clicking ‘Utilities’ on the ‘Go’ menu.

2. The Terminal window will display a prompt consisting of the name of the computer (in this case designcomp15s-mac-mini), current directory (which will be ~, representing the user’s home directory), and the username (in this case designcomp15). Type defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 and press enter. This setting will allow Time Machine to access the network drive.

3. Restart the computer for this setting to take effect.

4. Click ‘Network’ on the ‘Go’ menu and browse to the network drive. If necessary, enter a username and password to connect to the drive; otherwise, connect as a guest.

5. Load the Terminal application, type ifconfig en0 | grep ether, and press enter. This will output a value used by Time Machine in naming sparse bundles.

6. Type hdiutil create -size 100g -fs HFS+J -volname "Time Machine" COMPUTERNAME_XXXXXXXXXXXX.sparsebundle, where COMPUTERNAME is the computer name (you can find this within the Sharing section of the System Preferences) and XXXXXXXXXXXX are the characters outputted in the previous step (omitting the colons), and press enter. This will create a 100 GB sparse bundle. You can create a larger or smaller sparse bundle by replacing ‘100g’ with a different value.

7. Type rsync -aE COMPUTERNAME_XXXXXXXXXXXX.sparsebundle /Volumes/NETWORKDRIVE/., where NETWORKDRIVE is the name of the network drive, and press enter. This will copy the sparse bundle to the network drive (hdiutil cannot create sparse bundles directly on networked drives).

8. Type rm -rf COMPUTERNAME_XXXXXXXXXXXX.sparsebundle, and press enter. This will delete the sparse bundle from the computer. You can then close Terminal.

9. Click on the Time Machine icon and then click ‘Open Time Machine Preferences…’.

10. Click the ‘Choose Backup Disk…’ button.

11. The network drive will be listed — note that although the drive’s total capacity is shown, Time Machine will be limited to the size chosen in step 6 above. Click the ‘Use for Backup’ button.

12. Time Machine will start the back-up in two minutes. Alternatively, click on the Time Machine icon and then click ‘Back Up Now ’.

13. Time Machine will show a status of ‘Preparing’ while it determines which files to back up.

14. After a few minutes, Time Machine will start backing up files.

15. While the back-up is in progress, the sparse bundle will be shown as a disk on the desktop.

16. Open the System Preferences and click on the Spotlight icon.

17. Click on the ‘Privacy’ button and drag the Time Machine disk onto the list. This will prevent Spotlight from needlessly indexing the back-ups. You can then close Spotlight.

When the back-up is complete, the Time Machine disk will disappear from the desktop until the next back-up begins.

This article was last edited on 9th June 2010. The author can be contacted using the form below.
Back to home page
Bookmark with: