Hacker News new | past | comments | ask | show | jobs | submit login
Complete Hacker Tutorial to getting Time Machine over NFS to work. (mediafederation.com)
56 points by a904guy on Jan 30, 2011 | hide | past | favorite | 28 comments



Why does the title contain "Complete Hacker Tutorial"? Wouldn't "How I got Time Machine over NFS to Work" be a less linkbait-ish title?


Damnit, you beat me to my bitching.


Why use NFS over AFP or SMB? The technique is basically the same but at least AFP and SMB are encrypted...


For AFP on anything but OS X, netatalk was missing a flush-to-disk command and failed the last time I surveyed.

Various samba versions have been implicated in backups that are corrupt when when you go to read them. There are enough people successfully using samba now for time capsule that I suspect that issue is a thing of the past or restricted to certain NAS devices.

Time Machine is a big enough bandwidth user that I presume we are talking LAN, and for many people their LAN is secure enough.


AFP and SMB are not encrypted AFAIK. Maybe you mean the authentication is not in clear text, but the data transfer is. (NFS doesn't really have authentication unless you use Kerberos, which doesn't pass cleartext credentials either.)


I've already implemented AFP via netatalk. I'll do a write up on the process in a bit.

Personally I don't much care for SMB... but I've implemented it as well for our Windows boxes to backup over.


Shows the need for xattr on your NFS mounts, that is not documented in other tutorials I've found.


I'm not 100% sure on this, but from what I remember most filesystems now have xattr enabled by default.


I thought the same. I tested EXT4 on a fresh Ubuntu 10.10 system. My variables wouldn't save till I declared it.


That's interesting. But how does the restore work? Is this something that you can run from an install DVD?


The restore works just like any other Time Machine restore. In critical data loss when the machine has to be formatted. You will be able to restore the system completely from the Time Machine. Just remount the NFS on the new OS and run to command so Time Machine will see NFS mounts and click Restore.

~@


Will it automount? I don't see any specific steps to make it automount. SMB shares setup this way don't automount for me.

What happens on the public network? Is it still going to try to find the volume by IP address and back up?


I do Time Machine over AFP, but a more interesting tutorial would be Time Machine over iSCSI+SSH. In fact, that might make for a fun project next weekend.


Is Time Machine actually practical for anyone on HN? It seems as if for anyone who has a non-trivial amount of changing data on their laptop, Time Machine would be completely ineffective over a Wifi network (or even wired) - it would just be constantly transferring data and thrashing disks; on my desktop, I could barely afford even 1 complete backup, yet most of the data being backed up is cache files / stuff I don't care about losing.

Am I wrong on this? I've never actually tried to get it set up... does it deal with times where the file share isn't connected?


Works for me. I use an MBA as my main machine and it "just works". The first backup can take many hours, so that requires some planning, but after that, not so much.

I just forced an incremental back up and it took about 120 seconds. (Not much to push, it was only 20 minutes from last automatic one.)

If you don't spend time on the network with the backup device it isn't invisible. The backups get larger and take more time. I can see you'd have trouble if you primarily used your computer away from home, but backed up at home and only used it for a few minutes a day at home.


"I've never actually tried to get it set up..."

You could say that again. I bet you don't do any backups at all. Time machine has two options. The first is the location to backup and the second is directories to exclude. Ignoring cache files is one click away...

I used to have all sorts of different backup systems and even hacked my own backup system on top of time machine like in this article, but at the end of the day went out and picked up a Time Machine. It just works. Backups silently in the background and I can recover when needed. I nearly always backup over wifi and never feel it "thrashing disks" or using all my network speed. The hd's that ship with Time Machine are also pre-tested for quality so are not the cheapo hd of the week. Time Machine is also a wiki box, printer, and gig switch.


I think you're confusing Time Machine (the backup software on OSX) with Time Capsule (Apple's network backup hardware). Not a big deal but in this context it can be confusing.

http://www.apple.com/timecapsule/


> does it deal with times where the file share isn't connected?

Yeah, it just delays and retries occasionally until it's able to mount it.

I personally find it is fine to backup my macbook pro (1TB drive) over wifi to my Debian server. The first backup takes multiple days though. After that (when it works[1]) the backups take about 5 to 15 minutes depending on how much changed.

[1] I've been having tons of trouble with it the last few months where it takes forever and constantly gets errors while backing up random files. When tries again it gets further and further until it eventually finishes. But instead of getting backups every hour I get a backup finishing once a week or so. I switched from netatalk to samba on the server but I still get the same errors (so I don't think it's a transport layer issue). I know plenty of other people who back up just fine and I believe my issue isn't widespread.


It will even warn you if you haven’t connected to the drive for ten days or so. If it regains connection Time Machine will generally start copying files immediately (and quietly). I’m not aware of situations where you would have to micromanage Time Machine.

One bad thing about keeping your Time Machine drive disconnected for long is that Time Machine will eventually lose the thread. FSEvents logs every change to the filesystem and tells Time Machine which folders have changed. Consequently Time Machine ordinarily doesn’t have to search the whole disk for changes, it knows at all times what has changed and what to backup.

Logging can, however, fail from time to time, the longer the backup drive has been disconnected, the likelier that becomes. Time Machine then has to search the whole disk for changes which is time consuming and resource intensive. Connecting to the Time Machine drive only infrequently is not a nice experience, the hourly backups are usually no big deal.

Here is a great writeup about FSEvents and Time Machine on Ars Technica (part of John Siracusa’s epic OS X Leopard review): http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.a...; http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.a...


It’s not really practical for me and I don’t know how it could be practical over wireless LAN but I think it is the perfect backup solution for my parents. I bought a 1TB external drive for them and plugged it into their iMac [0]. It’s just sitting there all the time and they don’t have to worry about it.

All their documents are also in their Dropbox folder, but they have too many photos to make that practical for all their data.

All of this works without them ever having to do anything, they don’t even have to understand what’s happening. It’s perfect.

[0] I actually gifted them my old 250GB external HDD a year ago but it broke a few months ago, so I bought them a new 1TB HDD. The new 1TB drive actually also houses my offsite backup. It’s very infrequently updated (and I don’t use Time Machine, I drag over files I think are important) but better than nothing.


That's what I think too - it's brilliant for non-tech people, and it's straightforward enough that they can do it.


It works out great for me. I work primarily on a Ubuntu Desktop but for my Mac Air, all my files are on other servers, so really I only have locally Xcode and my development tools.

I assume everyones situation is different, I wouldn't be attempting to use TimeCode on a couple TB drives of a MacPro tower.


Wow, a real Hacker. He is able to setup NFS on Ubuntu. ;)


The OP could lose some of the sarcasm, but I do believe that "hacker" has become the new "ninja" or maybe even the new "rock star".


Hacker News :)


Sarcasm and 14 Karma... original. ;)


Now you can see what I mean^^


I'm not following the (stupid) masses on HN. So, I'll never reach a "good" Karma...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: