3

I currently use rsync with --link-dest to get an incremental Time Machine-ish backup of few sources with a variety of operating systems to a single Linux box. I swap out the backup drive to an external site every so often. One of these sources is a mac and while rsyncing from the Linux box to the mac appears to work, it believe it isn't catching all the details of the HFS+ filesystem so I couldn't really do a full restore from an OS DVD if I need to. Also, it takes an awful long time to backup the mac compared to other sources with similar amounts of data and number of files. So, I thought I would use Time Machine for the macs and continue using rsync for the other sources. Is Time Machine the best way to do this? If so, what do I need to do on my Linux server to have it be a valid Time Machine target? If not, what do you suggest?

I know there are several (Time Machine to Linux) pages on the Net, but I thought ServerFault could use one.

4 Answers 4

4

Do it via a NAS share (samba or NFS).

I use Time Machine to back up to a ReadyNAS (which runs Linux under the hood). Here are my notes on how to do so.

Enable NAS backups:

 - defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Find MAC address of the machine to be backed up:

 - ifconfig en0 | grep ether | sed s/://g | sed s/ether//

Command to create sparsebundle to copy over to NAS:

 - sudo hdiutil create -nospotlight -library SPUD -size 160g -fs "Case-sensitive Journaled HFS+" -type SPARSEBUNDLE -volname "hostname Backup" ./<hostname>_<macaddress>.sparsebundle

You need to insert your hostname and mac address to fit. This setup has been working with no major issues for quite a while now.

PS. You need to adjust the size of the volume. I have it set to 160GB as it's only backing up a Mac Mini.

7
  • Ok, so the sparsebundle is an HFS+ image in a file? Have you actually tried restoring from it? Is there a way to do this and be able to access the mac files from the Linux box? I've heard of AFP for Linux.
    – kbyrd
    Jun 20, 2009 at 23:22
  • Yup, it is an image. I have had no issues with restoring but YMMV. I have no need to access the files from Linux so have not investigated. Looking at it from the Mac, it looks like a regular volume.
    – Jauder Ho
    Jun 21, 2009 at 7:53
  • If you want to use time machine, you also could set up an iSCSI target on the linux box, install an initiator on the mac side and use this combination. If the target is not active (not mounted on the mac side), you could try to mount it directly on linux with mount -t hfsplus.
    – Sven
    Jun 21, 2009 at 12:12
  • I've been doing this for a week now, works great!
    – kbyrd
    Jul 6, 2009 at 16:35
  • Snow Leopard may also need com.apple.TimeMachine.MachineID.plist to be inside the sparsebundle. [ lone-gunman.be/2009/12/19/… ]
    – TonyUser
    Feb 13, 2010 at 0:38
1

You can configure to store the extended attributes of HFS+ in xattrs on the Linux fileserver with the -X and -A switches and the "fake super" functionality. This is working quite well, but you can use these xattrs only for restore to hsf+, especially ACLs are not usable on the linux side.

I recommend to compile your own rsync though, or use DarwinPorts version, as the apple supplied version was never working really well (and I am not sure if things got better recently).

see man rsync for the fake-super mode.

I can't comment on the speed issue, but maybe a locally built version works better.

2
  • I do have a locally built version from macports. I'll try the -X/-A flags and see. I think the time spent feels like it's doing a full file checksum on each file instead of just passing up a file based on size/time like it does from other systems.
    – kbyrd
    Jun 21, 2009 at 1:15
  • You'll need fake super mode. If the filesize/timestamp check doesn't work, is the time exactly the same on the mac and the linux box? I tested this check extensively here before going live with my backup solution, and it's working great.
    – Sven
    Jun 21, 2009 at 12:07
1

I have been successfully backing up my Macs to a Linux Server running CentOS via Samba by using SuperDuper! on the Mac. It has a smart update feature which allows incremental backups. The file it creates is not proprietary and can be used with Apple's Disk Utility.

SuperDuper! - Can be downloaded and installed for free, and only need to purchase it if you want to use the smart update features: http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html

-1

There is a step-by-step guide using avahi and netatalk at http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/

As far as I understand, compiling is not necessary. You can just do this:

sudo apt-get install netatalk avahi
1
  • 1
    Welcome to Server Fault! While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – freiheit
    Dec 30, 2012 at 6:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .