Synching /home/$user on a laptop with your server

The small office I’m supporting is moving away from desktops to laptops. This means the current setup in which not only the shared datadrive but also the homes of the users are exposed through NFS will no longer work: laptops should not be assumed to be connected to the Internet at all times.

So instead of serving all /home/$user folders from the server, I’ll have to cope with having these folders on each laptop and then syncing them to the server.

One option would be to have the nextcloud desktop client sync all files in the /home/$user folder with a server. Until now however I have only synced a subfolder of my own home-folder with my Nextcloud server (which works just fine).

Did anyone else already do this? Care to share experiences on this? If this works, is performance ok?

Thx!

Rather sad that no-one has replied to this over 2 years. Lamentable community interest it seems … oh well. A head’s up that I just did this on a mobile PC and seems to work fine, though personally, I turned off syn on all the ~/.* folders. One by one currently as I haven’t researched a possible exclusion pattern to catch them all. But I want the users documents, pictures and such synced by default without having to explain anything (a sort of background backup of their work). Non technical users (kids) and so just want to make sure their stuff is backed up.

I did this too. I synced my whole home directory. In order to prevent syncing of hidden files and folders (present and futures), I used the ignore patterns of the desktop sync client.

You can enter the name patterns to be excluded in the nextcloud client: on the right of the sync name, click on the three little points and choose “Ignored file list”.
Then, in the left column, enter

  • .*/ in order to exclude hidden folders on linux
  • .* in order to exclude hidden files on linux

Click ok and restart the sync.

Alternatively, you can also open the file .sync-exclude.lst, a hidden file located into your nextcloud root folder (in this case your home directory), and directly enter these two lines:

.*/
.*

And that’s it. You nextcloud client will automatically ignore all hidden files and folders. And that, everywhere in all subfolders also.

For what reason did you decide not to sync the hidden folders and files?
Right now, I think it is quite convenient to have a hidden folder synced like .ssh or like the hidden file .bashrc
EDIT: I think I have found the answer myself. Reason not to sync hidden folders is since hidden folders can take up a lot of resources (!!!) i.e. for me .docker uses almost 50GB next to .cache with 12GB, which I will both ignore before uploading.

The reason to not sync hidden folders was because most of these contains settings or temporary files on my linux computer. Syncing them to another machine makes most of the time no sense, because the programs using those do no expect their data to be modified by others than themselves.