Ubuntu – Why not sync folders outside home with Ubuntu One

ubuntu-one

It took me a while to find out that with Ubuntu One I can sync only folders in my home folder. On all other folders the Ubuntu One option is available in preferences, but the actual actions are greyed out.

The Ubuntu One FAQ is quite clear on that:

No, currently you can only select to synchronize folders inside your home directory.

But I actually wonder why and if this is going to change and if there is a trick around it (an other one than setting my home to /) ?

I personally don't have any important data in my home folder other than the program configs. All documents, pictures, music are on a folder called /data that is actually on a different partition. That makes it much easier when one wants to reinstall Ubuntu.

Best Answer

It's not going to change, at least in the foreseeable future (and on this I can foresee a couple of years into the future). Allowing users to select arbitrary folders outside of their home for syncing with Ubuntu One, which could potentially sync between multiple different computers, opens a large number of usability problems to cover a use case that, quite frankly, isn't all that common.

One of the problems that I remember off the top of my head is that if you try to sync a mount point of a removable device (and quite a few people try to do this), when you remove the device syncdaemon will delete everything; to make it work properly syncdaemon would have to know about devices, detect their removal, things like that. Quite a large effort, and a lot of potential for usability nightmares.

Another problem is if you try to sync a folder with special permissions, ownership or file types in it: think of /etc/, /tmp/ or /dev/ as some of the worst cases. Or any folder you don't own, really. We could simply disallow syncing folders you don't own, but we know for a fact some people are running syncdaemon as root (despite our warnings).

A workaround for you would be to mount (via /etc/fstab, so you're reasonably sure the partition is mounted every time -- otherwise you risk losing your synced data) the /data folder into your home. You could simply move /data to ~/data or, if you have things that have the /data path hardcoded (quite likely), or if you're already used to /data yourself (also quite likely), symlink or bind mount /data to the mount point in your home. If you don't want to see it in your home at all, just make it ~/.data.

Related Question