Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
I'm not buying "you don't want to sync special partitions". I don't think it's a valid reason not to sync stuff outside your home directory. There are certain folders/directories that U1 should never sync. /etc, /home, /boot for example, on Linux; \windows, \program files on Windows. I have this exact same situation. I don't keep anything in my home directory or in my Documents directory on my Windows laptop. I'd have several GB worth of stuff there if I did. I prefer to use a couple other locations, instead. –  user38450 Dec 19 '11 at 1:44

5 Answers 5

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.

share|improve this answer
    
I think the use case is not very common now because there isn't a nice interface available for syncing arbitrary folders. Its not an easy task I agree, but once the engineering and usability issues are solved and a nice intuitive interface become available, I am sure many people would use it, since many people have multiple computers. –  Aras Dec 19 '11 at 1:59
    
SpiderOak, Wuala, and Bitcasa all support syncing external drives on Linux, so the issue is not insurmountable. You mention that syncdaemon will delete everything when the drive is removed - aren't you guys the authors of syncdaemon? Can't you program it to not do that for external drives? –  BlueRaja - Danny Pflughoeft Aug 20 '12 at 17:38
    
Yes, of course we can. We haven't done so yet. –  Chipaca Aug 24 '12 at 16:58
    
On windows with power users, it's just <del>stupid</del> unwise to forbid changing this. Companies, and sane home setups, have system drive often as different from the data drive in Windows. Eg. I never keep anything in c:\users\<myusername>, I keep all personal and all other data at a separate partition on a separate hard drive. But in Windows, mounting and linking is not as easy as in linux in all versions, so one does not simply mount or link those drives or folders into one's home folder. I find it totally insane that I'm not allowed to change this location. Even dropbox allows that. –  naxa Jan 11 '13 at 1:53
1  
@naxa power users can change the location of their home directory to another drive (which, if you are actually keeping all your personal data there, you've already done), so that particular point is moot. –  Chipaca Jan 11 '13 at 15:12

I suspect the reason is rights. You'll notice that you can't easily edit any of the files outside your home directory either? This is a general security feature of linux, and I suspect that the Ubuntu One developers (quite rightly) feel that the average user would keep all his files in the home directory, where the daemon can easily run without elevated privileges.

On a side note about your configuration, its all a matter of preference, but I keep my complete /home/ on a seperate disk/partition. This does mean that between re-installations you need to go through and delete all the hidden folders/files for a clean install, but will give you the advantage of a completely native home directory with ubuntuone rights, etc. - just a thought.

share|improve this answer
2  
oh, and I've just tried one of the more obvious workarounds (sym links) and ubuntuone wasn't having any of it... –  thomas michael wallace Jul 1 '11 at 8:08

I did manage to get this to work by using a bind mount. The line in /etc/fstab looks like this: /mnt/s1/Audio /home/daniel/Music bind defaults,bind 0 0

Obviously you will need write permissions to the folder in question. Possibly you may need to own the files also, I'm not sure.

share|improve this answer

In two words: Use Dropbox.

The reasons listed by @Chipaca might be difficult to overcome, but dropbox has managed somehow. True, this solution isn't open source, but until the folks at Ubuntu One solve some major usability problems (this being one of them), lot's of users won't be able to use Ubuntu One.

share|improve this answer

I have a very similar setup under Ubuntu 12.04. I have an NFTS partition with my music library on it that is visible to both Windows 7 and Ubuntu. I wanted to be able to synch this directory to Ubuntu One without having to explicitly move the entire directory to my home directory (seems like a reasonable request, right?).

My solution was simply to mount the shared partition within my home directory each time I boot into Ubuntu. This took two fairly simple steps.

  1. Install and use pysdm to ensure that the partition mounts correctly on startup (not necessarily in your home directory, just somewhere in the file system). Alternatively, you can modify the /etc/fstab file yourself if you're confident enough. As a fairly new user, I found the pysdm solution more straightforward.

    Either way, make sure to backup your /etc/fstab file before doing this step! (just in case!)

    sudo cp /etc/fstab /etc/fstab.old (for example)

    If something goes wrong, you can always restore the old file and be back to square one:

    sudo cp /etc/fstab.old /etc/fstab

    In the pysdm GUI, select the target partition and hit the "Assistant" button. Make sure to select the "The owner of the device can mount it" option. This will ensure that you can re-mount within your home directory using Upstart. In my case, I set the sda4 partition to mount at /media/sda4/.

  2. In general, the behavior of Upstart is defined by files in the /etc/init/ directory. To mount the new partition (for me, /media/sda4) within my home directory, I defined a /etc/init/mount-mydirs.conf file that contains:

    start on runlevel [2345]
    task
    exec /bin/mount-mydirs`
    

    The first line tells Upstart to perform the task upon normal startup. The second line tells Upstart that the job is to be performed once (not as an indefinite or recurring job), and the final line tells it to execute the script /bin/mount-mydirs (with root privileges).

    The file `/bin/mount-mydirs' looks like:

    mount --bind /media/sda4/ /<home directory>

    (The --bind option allows for the files to be accessed from both the original mount point and the new one).

I am listening to my fully synched, newly mounted music library as I write this!!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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