1

I have several OSX client machines that back up via TimeMachine to AFP shares on an Ubuntu Linux server, exported by netatalk/afpd. These clients back up at arbitrary times of the day, every day. There are other important non-TimeMachine AFP shares on the server also.

On the server, the TimeMachine backups are represented as sparsebundles - a data storage format involving many 'bands' - stored on the standard EXT4 filesystem. Buried within this sparsebundle is the HFS+ filesystem that TimeMachine uses, but from the server side it is just a collection of band files.

I have rsnapshot running every 4 hours on the server, which backs up the entire server onto a removable HDD (which I swap out frequently). Therefore rsnapshot is also backing up these sparsebundle bands at certain times of the day.

The problem is that if rsnapshot runs while a client machine has its sparsebundle mounted, it is possible for rsnapshot to capture an inconsistent state of the sparsebundle because the bands may change during the backup process. Clearly this is not conducive to guaranteeing a restorable backup!

I'm trying to think of ways to work around this problem. It seems important that the sparsebundle is not mounted at the time rsnapshot tries to do the backup. From the server side, the only way I can presently see to do this is to take down the aftp daemon, perhaps after waiting for the sparsebundle to be unmounted by the OSX client. The downside of this is that it also takes the other non-TimeMachine AFP exports offline also. As far as I can tell, afpd doesn't provide a way to (easily) add/remove exports - one option is some complicated rewriting of afpd's config files to disable the TM exports, but this still takes down the AFP shares for a short time.

Is there a better way?

3
  • This is a an important and well-written question. I'm sorry it didn't get more attention here. I thought of offering a bounty on your behalf, but realized it might find better audience on ServerFault, because having a good answer to this would help a lot of sysadmins who support Mac users. Consider asking it over there. For that site, make sure to make it sound more like a sysadmin-supporting-Mac-users question, not a "how do I solve my home network backup issue" question.
    – Spiff
    Commented May 9, 2014 at 16:59
  • Ok, I'll consider that. Why does it sound like a "home network backup" issue? It's actually my (very small) business backup, and I can't see anything I've written that sounds "homely"...
    – davidA
    Commented May 12, 2014 at 9:25
  • I have reworded it and posted it here: serverfault.com/questions/594939
    – davidA
    Commented May 14, 2014 at 2:00

0

You must log in to answer this question.

Browse other questions tagged .