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.

What ways are there to sync my full $HOME across machines (currently 2)? Required features:

  • exclude either symlinks outside tree or mount --bind so I can have big data outside the homedir but still linked within (say .wine).
  • Sync both ways, automatic preferred.
  • Conflict resolution of some kind would be preferred
  • No foreign servers

I have so far looked at owncloud, but the client tends to crash with ~ 25GB of data :-(. And it doesn't support symlinks.

share|improve this question
    
Well, there is Unison but I had a problem with it not preserving the mtime on the files it transferred. –  Dan D. Mar 17 '13 at 8:28
    
@DanD. Reading through the documentation: times: When this flag is set to true, file modification times (but not directory modtimes) are propagated. –  Tass Mar 18 '13 at 0:26

2 Answers 2

up vote 1 down vote accepted

For two way sync you should use unison (http://www.cis.upenn.edu/~bcpierce/unison/) because rsync isn't that good at bidirectional syncing. Unison works with ftp and ssh and provides a commandline interface and a graphical user interface. Resolving conflicts has to be done manually (trust me, it's better doing it manually).

Most GNU/Linux distributions have unison in their repositories, the graphical interface mostly comes in a separate package like unison-gtk or something like that.

share|improve this answer

You should be able to do this using a cronjob that runs rsync:

Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be copied. It is famous for its delta-transfer algo‐ rithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use.

        --safe-links            ignore symlinks that point outside the tree
share|improve this answer
    
A cronjob is not fast enough. When I'm home, it should start copying, so the trigger has to be something different. –  Tass Mar 17 '13 at 19:03
    
You can run a cronjob every five minutes. That's not fast enough? If not, you can always try Dropbox or something similar. –  terdon Mar 17 '13 at 19:18
    
Rsync has a direction of sync, push or pull, so if I run the push cronjob on both machines, and they trigger at almost the same time, chaos ensues. –  Tass Mar 17 '13 at 19:47
    
Ah, yes, true. Another option (if your network is up to it) would be to export the $HOME from one machine to the other. Assuming one of them is connected to a high speed internet connection with a decent upload, that might work. Could you give some more details about your usage scenario? Are both machines always on? Also, rsync can be set to copy newer files only, if that is run from both machines you should be ok. –  terdon Mar 17 '13 at 20:51
    
Notebook and desktop. The uplink is bad (as usual with today's async internet), so hooking it via share is bad as soon as I'm out of the house. Also, working without wifi is impossible. –  Tass Mar 17 '13 at 21:20

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.