1

Say you have two computers with different hardware (two laptops or a laptop and a desktop) that you want to use alternatively. For example, I am using the comfortable desktop now, and want to mirror all documents and settings to a laptop to travel, and then push changes back to the desktop when back at home. Both have same OS (Ubuntu 14.04LTS 64bits), same installed packages and (for the sake of simplicity) a single user (same name, same password).

Here is how you can sync (I will use rsync over SSH on a direct Ethernet cable between two laptops) and here is what you should sync to mirror folders and settings. Also, here you can find a great list of files and folders that may be left out for efficiency when the goal is a backup (though some may be useful in this case, like histories, recent files or some caches) and, again, here is a nice and practical way to do it in rsync.

I know that most hardware-specific configuration files should be out of user folders by design. Still, there are any files/folders within /home that must be left out of this sync to avoid configuration problems between different hardwares?

5
  • Is there a reason that you aren't just doing something like owncloud, bittorent sync or dropbox?
    – jrg
    Feb 10, 2015 at 22:22
  • Not going to add as an answer, since it just a brief thing. I think the only thing you don't want to transfer are the dot files. Files that start with . Such as profile and some others depending on what software you have installed. Just in case you don't know, you can see these files by doing a ls -a in your home directory. If the file is needed on the other system, it will be recreated. You may want to transfer ones if you made changes, like possibly .aliases. Or if you intend to install software on other pc 2 that has a dot file on pc1, you might want to install first then replace the dot fi
    – geoffmcc
    Feb 10, 2015 at 22:27
  • @jrg: In my specific case, a slow/intermitent internet connection is the reason to avoid the cloud-based alternatives. Anyway, the question is about WHAT to (not) sync and not about HOW to do it
    – FairMiles
    Feb 10, 2015 at 22:29
  • @geoffmcc. But in that way I lose the possibility of sharing configurations/settings (the question is based on same OS and software in both machines)
    – FairMiles
    Feb 10, 2015 at 22:33
  • Well as long as software is already on pc2, you should be fine to do the dots. I was just concerned if you do them first, then install the software you may have lost your custom settings.
    – geoffmcc
    Feb 10, 2015 at 22:35

1 Answer 1

1

I know that most hardware-specific configuration files should be out of user folders by design. Still, there are any files/folders within /home that must be left out of this sync to avoid configuration problems between different hardwares?

If you want to keep both systems totally idential and have the same software and the same settings I would stay away from at ...

.Xauthority
.xsession-errors

and copy all of the other files. But I would not try to keep desktop and notebook identical when looking at software and software settings. It is a waste of time. Synching only the normal files in /home/$USER/ (Documents, Downloads, Pictures etc) and none of the hidden files should be enough.

a single user (same name, same password).

I would advice to also use the same user ID (they probably will be the same if there is a single user on each system).


Mind though that this should not be considered a backup method and I would suggest to plan a backuo for each system.

2
  • Some simple examples of useful settings to sync between working computers that come to mind are browser bookmarks and tabs (FF), offline email folders (Thunderbird), shell history (Bash) and current working projects (RStudio). All those are saved in hidden folders/files within /home…
    – FairMiles
    Feb 11, 2015 at 2:15
  • In general, you should be able to sync everything. In practice you may have problems. It is best to generate a list of files and directories you wish to sync rather then blindly syncing everything. You already have a list to start with, although I personally would not sync shell history.
    – Panther
    Feb 11, 2015 at 4:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .