Wednesday, July 02, 2008

Ubuntu, Unison and Netdisk

So let's say you, like me, have decided to use Ubuntu...

And let's also say that, like me, you prefer having your backups in the form of file sync (like the awesome Windows utility Syncback) as opposed to the typical backup tools that come with UNIX and LINUX systems (which create .tar files).

So let's say that you look for something like that for your Ubuntu, and you discover Unison, which is a great little file sync tool that does the job well.

Now let's also assume that, like me, you are trying to use Unison to back (no, wait... synchronize) your files up to a Netdisk you had lying around from when you were a Windows user.

All fine and dandy.

So you install Unison - note that while both Synaptic and "add/remove programs" list Unison, but it's a relatively old version. To get the most recent, you need to go into Synaptic -> Settings -> Repositories -> Updates, and make sure you have "Unsupported Updates (hardy-backports)" checked. Then search for "Unison", mark "Unison-gtk" (not "Unison"!) for installation, and let Synaptic download and install it for you.

Great.

Now you connect to your netdisk - you've figured out how to do that by now, right? (sardonic laugh) - run Unison, create a profile, and...

Oops.

It claims something's wrong about permissions, and won't do it.

It took me awhile to figure out what's going on, but the deal is that my Netdisk is using a Windows OS file system (either Fat32 or NTFS), while Unison expects the Linux ext3 file system. Unison is therefore trying to match permissions on the backup side with the source, but since permissions do not carry over between file systems, it blows up and the backup fails.

It took me a bit longer to figure out the solution, but it's uber-simple. Open up a terminal window, or your file manager. Either way, you need to get into the .unison directory in your home directory. Then find the profile file you defined - the one with the name you chose and the .prf extension - and add a line at the end of it:

perms = 0

That's it. Start Unison and everything will work like a charm. It's crazy fast, too, much faster than any file copy operation I've ever experienced on my Windows boxen.

3 Comments:

Anonymous Anonymous said...

hah your post describes _exactly_ what i was going through aswell.
Thanks for the perms = 0 tip, works perfectly.

Wednesday, June 03, 2009 7:57:00 AM  
Blogger Blinkered said...

You're welcome. It was driving me NUTS until I figured this out... but once it works, it works beautifully.

Wednesday, June 03, 2009 9:52:00 AM  
Anonymous Anonymous said...

Thanks, works like a charm!

Thursday, April 19, 2012 1:51:00 PM  

Post a Comment

<< Home