Mac OS X Time Machine with Linux Server

November 29, 2007 – 7:28 am

Time Machine was one of those features that pushed me over the edge to buy the mac. The one thing that was a little disappointing is that it only works with a locally-connected drive (by default). This behavior, however, can be changed. I used Appletalk on my Linux box, but I’ve heard of people using Samba (SMB) and NFS. Here’s how to set it up using Appletalk:

  1. Install netatalk with ssh enabled on your Linux box (instructions for doing this on Ubuntu are found here).
  2. Create a new directory to use as your Time Machine vault.
    sudo mkdir /var/timemachine
  3. Edit /etc/netatalk/AppleVolumes.default to add your AFP network drive (man page for this file is found at this link). At the bottom you will find the entries that define the Appletalk mount point and the “friendly name”. Add the following line at the end of the file to “mount” your new timemachine directory:
    /var/timemachine/ "Time Machine"
  4. Now, back on the Mac, select Finder’s “Go->Connect To Server” menu option. Enter the Appletalk address of your Linux box. For example, if my Linux box was at IP address 192.168.1.2, I would use this connection string:
    afp://192.168.1.2
    If it prompts you for a username and password, use one that has read and write access to the /var/timemachine/ directory. I have found it easiest to just add a user to Linux that matches the username/password of a user on the Mac.
  5. Select “Time Machine” as the drive to mount.
  6. You need to tell Time Machine that it’s OK to use network drives for a backup volume by executing the following from a Mac Terminal shell:
    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
  7. Open Time Machine, select your new “Time Machine” network drive, and off you go.

  1. 6 Responses to “Mac OS X Time Machine with Linux Server”

  2. I have heard a lot about Time Machine and have my eye on it as well. Those are great instructions on how to back up your external drives.

    By Jay on Nov 30, 2007

  3. Alas, this did not work for me. I’ve tried a multitude of things that have been suggested but I just can’t get TM to allow backup to a network volume unless the volume is served from a Mac.

    By miken on Jan 21, 2008

  4. Looks like it works without netatalk as well, if you have Samba installed. Just use smb://server instead.

    By Anders Bergh on Feb 13, 2008

  5. Mine allowed it to be used, but then couldnt create the image for backing up to

    By sam on Mar 20, 2008

  6. I just get an error saying i can’t connect (from OSX) , and I did this over and over again from clean slates. (3 or 4 times).

    I just figured out SMB and now its all working- I am currently backing up over the network.

    By Christopher on May 12, 2008

  7. I keep getting the following error when I follow this process:
    The backup disk image could not be created.

    Everything works fine until I get to the actual backup step in Time Machine. It seems to not like the network drive even though it let me select that drive to use as a backup.

    The situation I have is:
    external hard drive (linux partioned in full)
    connected to an Ubuntu linux box via firewire

    Is there something about this configuration that might be causing the problem?

    By Jon on Jun 29, 2008

Post a Comment