6

Until now I have two ubuntu laptops at home. I use usually the one, my wife the other. Kids start to get older and use whatever is available.

It would be very handy, to have a centralized /home, for example an SSD attached to the router.

How do I achieve the following:

  • User A on Laptop L1 is also the same user A on Latptop L2
  • synchronize content: As soon as content is saved on Laptop L1 by user A, it will get synced to L2 (either when the L2 is on, or latest when A logs into L2; I know that conflict management might be an issue here)
  • If the central home service becomes unavailable, a transparent shadow copy will be available. As soon as /home/ becomes available again, syncing starts.

What I do not care:

  • I do not care if L1 uses e.g. Libreoffice 4.0 and L2 Libreoffice 3.6 or L1 has Gimp installed while there is no Gimp at all on L2.

BTW. I do not know the proper wording for "Roaming profiles" in the Unix world, another term?

JohnDoe
  • 193

1 Answers1

1

First, note that the /home directory contains your personal configuration files for different programs as well as documents and data. For example, the config file for LibreOffice 4.0 may be slightly different from the 3.6 version and syncing them may create some problems. I will assume you only want to sync data and document files between L1 and L2 for user A.

Soultion One: [Cloud]

Use Ubuntu One to sync the Documents and any other folder you need between the two home folders of L1/A and L2/A.

The Ubuntu One comes pre-installed in Ubuntu. Start the program and create an account id you don't have one.

Open Nautilus and right click on the folder and and select "Synchronize on Ubuntu One" on both L1/A and L2/A.

Note, This is an Internet based solution and has some limitations. For example, the free account only has 5GB of space. The sync won't work if there is not Internet connection. If you delete a file from L1 it will get deleted from L2 as soon as you login to L2.

Advantage, both L1 and L2 do not have to be turned on at the same time for the sync to work.

Solution Two: [GUI Local solution]

Use Unison, a folder syncing software on both L1 and L2. This is a bit harder to setup and is not as automated as Ubuntu One. Both the computers need to be turned on for sync to happen.

It may be better to have a Desktop (D1) that is always on and use that as the Unison server and sync L1 and L2 with D1. A how to setup is available for a slightly older version and another one is here. I am not describing the setups in these links here, as they each describe a slightly different setups than what you want.

Solution Three: [Command Line and Scripts]

Use the commands rsync and anacron to periodically sync L1 and L2. for example from L1:

rsync -vxtr -e ssh [user]@[IP_address_of_L2]:/home/[user]/Documents/ /home/[user]/Documents/

See How to sync files/data between two PCs on a home network?.

See How can I run anacron in user mode? also.

As with Unison, both the L1 and L2 must be on for this to complete.

There may be other solutions.

Hope this helps

user68186
  • 37,461