New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Sync'ing/backup to Bubba using Unison - better than rsync?

How are you using your Bubba? Got ideas for a cool modification? Share!
Locked
xMachina
Posts: 3
Joined: 14 May 2008, 08:08

Sync'ing/backup to Bubba using Unison - better than rsync?

Post by xMachina »

So I've been thinking of the best file-sharing and backup setup based around my new Bubba for the past week.

Seems like a lot of people are using Rsync to back up files from their desktops to Bubba, or to back up Bubba to an external USB hard drive.

But it occurred to me that since I'll be using my Bubba's /home/storage directly mounted via NFS on my "lite" devices (my eee-pc laptop when at home and my PS3 linux), it'd be nice to have a 2-way synchronisation setup so I can add new files to the Bubba's copy and have them synch'd to my external USB drive when I go on the road, but also vice versa.

The Unison project seems to fit the bill here (http://www.cis.upenn.edu/~bcpierce/unison/), and is available from the Debian Sarge repos, so I decided to give it a go.

The first trick to watch for is it needs exactly the same version on all your clients, Debian Sarge only offers 2.9.1 so make sure you ask for this specifically on your other (probably x86-based) machines. The second thing is user permissions, unison prefers to run as a user rather than root program (good in my opinion), but it means you'll need to get your permissions/users sorted on different machines so it can actually delete files.

It wasn't too hard to get set up though, and so far I'm testing synch'ing my ~3 Gig collection of photos between the Bubba and my External HDD mounted from my desktop. I deliberately made a few changes and it worked fine, once the initial synch is done a subsequent scan took only about a minute. I ran 'top' on the Bubba during this and although Unison was often taking 80% CPU (presumably it's doing lots of checksum calcs), it was using hardly any memory so isn't likely to crash it, though it could be a problem if you're running a non-trivial webserver on your Bubba too I guess.

Anyway next step is to configure synch'ing certain parts of my desktop's HDD as a cron job (or maybe straight after logon) in batch mode, with a list of conflicts emailed to me for review, which seems very possible. If anyone else is interested I could write that up as a proper HOWTO when I get it working. Phillip Guo also has a decent guide for setting it up - http://www.stanford.edu/~pgbovine/unison_guide.htm
xMachina
Posts: 3
Joined: 14 May 2008, 08:08

If you're running Hardy on one of your "client" ma

Post by xMachina »

Just discovered that if you're running Ubuntu Hardy Heron on one of your other machines you intend to synch with your Bubba using Unison, it doesn't provide Unison 2.9.1 by default. So intstead of compiling from scratch:

temporarily add the Gutsy universe repos:

Code: Select all

sudo vim /etc/apt/sources.list
and add:

Code: Select all

# Temporarily need Gutsy to get Unison 2.9.1
deb http://au.archive.ubuntu.com/ubuntu/ gutsy universe
then run:

Code: Select all

sudo apt-get update
sudo apt-get install unison2.9.1 unison2.9.1-gtk
...it will download and install the right version. Then remove the Gutsy repos again, editing /etc/apt/sources.list and adding a comment to your new lines so they look like:

Code: Select all

# Temporarily need Gutsy to get Unison 2.9.1
# deb http://au.archive.ubuntu.com/ubuntu/ gutsy universe
and you should be good to go.
Nöbbe
Posts: 13
Joined: 19 Feb 2007, 06:22
Location: Lund, Sweden
Contact:

Post by Nöbbe »

Hi!

I thought I would give Unison a shoot, tried it before on my win computers. I was bold enough to try to compile the latest stable version too (2.27.57), and all went fine.

However I was thinking to use it as server, and therefore started it with the command

unison -socket 1234

And then I got the error

"Fatal error: Error in waiting on port:
Address family not supported by protocol [socket()]"

from which I googled out the 'solution' at
http://lists.seas.upenn.edu/pipermail/u ... 00266.html

I have still not tested the solution, or patch as it is, but I was wondering if you get any error message when you run unison with the socket switch?

Thanks for the help,
Martin
Locked