7

At home I've got a pc tower running arch linux. Recently I also acquired laptop for on the road, but I'd like to be working on the pc tower when I'm at home.

Now I'm pretty sensitive as to how my machine is configured (that's why I need the laptop, I hate the windows 7 stations at my university). I was wondering if there is a way to synchronize these two machines? I would like these to be "exact" clones of each other, so I could seemlesly switch from one to the other (after the sync of course).

I was thinking about using rsync but I don't know if that's the best option. If so, what should I be careful of? Are there any good tutorials out there?

Also, if possible, I would also like the use the home pc as a website server, so there are some sections of the machine that need not be synced (namely the website's directories).

Just to be clear: both computers will be running Arch Linux.

5

There is one tool, that goes beyond rsync, which personally I think is one of the best syncing tools out there, and that is Unison.

I should point out though, that a total 1:1 copy of one machine and the other, is probably not the best idea, since those are two different computers, etc.

Syncing document folders, however is easily done with rsync or unison. another option would be using git repositories for not only projects, but things like config files and other documents. Since this is a decentralized system, you don't need servers to sync to, etc.

Partially syncing your $HOME directory should be no problem, just look out for things like Gnome configs, etc. In essence, you should carefully decide, what to sync and what not.

  • I have used Unison myself too, really nice piece of software. – Not Available Jun 26 '12 at 6:32
  • I've stopped using unison for two reasons. The most important is that the timestamps on the directories (and files if using default settings) will not be the same on each computer. The other reason is that each computer must have the same version of unison. This might not seem like a big deal, but my work computer often lags behind my laptop when it comes to updates and I've had unison refuse to sync. – equant Aug 21 '16 at 21:31
  • 1
    @equant: I also stopped using unison because of the missing timestamp synchronization. I asked the author of the program about this feature but it is not easy to add and it won't be implemented in the near future. Otherwise, unison would have been the ideal tool for me. – Giorgio Sep 2 '18 at 11:06
1

Your best bet(I think) would be manually specifying what config files, folders, etc. need to be synced. And then indeed running an rsync or other synchronization program/tool.

  • 1
    rsync is not well suited for this, since it's uni-directional which makes it error-prone. – Marco Jun 21 '12 at 9:47
0

Personally I solved this with a NAS (Network Attached Storage). Solutions such as those by Synology (no I don't work there, or even own shares, I just like their product) allow you to use DyDNS services to allow continuous access. I had to solve this problem with 2 windows PCs, an Ubuntu Server, a Mac laptop, a Windows laptop, 2 smart phones and a tablet. It's been working swimmingly for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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