Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 2 computers which mirror the same data. Is rsync the best tool I have to keep these 2 machines in sync? One is a desktop, the other is a laptop, both of which run linux.

Walter

share|improve this question
2  
alpha1 has provided some great options for you. Just want to say that rsync is not the tool for this because it does not do two-way syncing. So if you work on both the desktop and laptop without always rsyncing first, you stand to lose data or not propagate changes, even if you were working on different files. A proper two-way sync tool would be better (unison, as mentioned, or Synkron). –  fideli Sep 12 '10 at 7:17

3 Answers 3

up vote 2 down vote accepted

How much data do you need to sync?

If it all in different directories or all in, oh say ~/documents/?

rsync will work, but there may be options that give you other advantages.

Dropbox.com is one, provides 2 gig free storage. http://www.dropbox.com/referrals/NTExNTI1Mjk This link will get you an extra 250 megs free if Dropbox looks like a good solution for you.

SpiderOak is another, same thing, 2 gig free, pay after that (OpenSUSE users get a discount)

Theres also Unison. http://www.cis.upenn.edu/~bcpierce/unison/ Which does a great syncing job.

Almost anything will work for this, its just gonna be a matter what works best, whats the fastest, what gives you stuff like the chocolates on the pillows at a hotel as a nice little bonus.

share|improve this answer
    
I have never gotten the chocolates on my pillows, at what price do they start to do that? I stayed at a $400/night hotel where they have a spa in the suite, it was nice, but no Ghiradelli Chocolate :). –  Walter White Sep 12 '10 at 12:44
    
I basically want to sync everything, music, photos, code, text documents, spreadsheets, etc. I have about 200G of data I want to sync, I don't edit it all at once, it might be a text document here, a spreadsheet there. I looked at distributed filesystems, but I don't know that is what I want. I have 2 computers that I want to sync with each other. –  Walter White Sep 12 '10 at 12:55
    
Looks like Unison will work, I am trying that now. –  Walter White Sep 12 '10 at 13:18
1  
Unison-gtk is the bomb, I am really pleased with it. Thanks for helping me find it. –  Walter White Sep 12 '10 at 17:30
    
your welcome, I never really got the hang of using it, I use a networked SMB/FTP, SSH and everything else box (freenas) and dropbox for alll my backups etc, and do it by hand. But I've heard amazing things about unison –  alpha1 Sep 13 '10 at 1:09

Complementing Alpha1's answer, if the data is bigger than 2GB and you want to do it without dropbox-like services, Unison is the solution for you.

Unison is the only reliable tool that I know for this task. It will do the right thing even in corner cases, even if your comptuer crashes.

  1. Both mirrors have the same importance/priority.
  2. Files may be changed on either computer, and they may also be deleted.
  3. You want to propagate the changes to the other mirror.
  4. You don't want deleted (or renamed!) files to be restored back, on the contrary you want to propagate the deletion, and rsync will mess it up.
  5. If you change a file in both mirrors, or change it on one mirror and delete on the other, you don't want any of these to be propagated automatically. You want to work that out by yourself.

Once it's set, Unison is not only robust but fast!

Unison takes like 3 seconds to tell you that nothing changed in each mirror of your 200GB stored inside an ext4 filesystem. If you have ecryptfs on the top of ext4, it takes about 3 minutes. If something changed, it will spend some time analysing the changed files, so the time is proportional to the change.

Don't mount your laptop remotely from the desktop or vice-versa. Tell Unison to reach the other root via ssh, so it can see the true filesystem where the files have been since the last sync and do its fast check. Both computers should have the same version of Unison.

share|improve this answer

If they're running Ubuntu, why not use Ubuntu One? It's design specifically to do exactly what you want to do, and supports a few other cool use cases too.

share|improve this answer
    
Both Dropbox and Ubuntu-One have compared to Unison (i) Limited space (ii) Leaving sensitive data in the hands of a thrid party. Now Ubuntu One with respect to Dropbox has (iii) the lack of cross-platform support (iv) It was a bit buggy when I tried it some months ago. I love Ubuntu, but I leave a few of its "features" aside. –  user39559 Sep 16 '10 at 13:08
    
Good to know - I haven't used ubuntu one but had heard good reports. –  imoatama Sep 16 '10 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.