Can I symlink a Dropbox folder?

I've just installed Ubuntu 12.10 as a dual boot with Windows 8. I'd already had windows up and running for a few months before installing Ubuntu, so in order to have my files accessible from both OS's, I have the windows partition automatically mounted, and the folders in /home symlinked to their windows counterparts.

This is working really well except for my Dropbox folder. The dropbox folder created by the windows side is accessible by the linux side, but obviously it doesn't sync any more. The same problem arises the other way round.

Can anyone think of a way around this, to get both sides syncing the same data? Is it possible to point dropbox to a pre-existing folder instead of having it create a new folder?

Thanks


Solution 1:

Dropbox should not have any problems using a symlinked "Dropbox folder".

Make sure the dropbox folder on your win partition is synced and uptodate.

dropbox stop
cd /home/$user/Dropbox
tar cvfz /home/$user/backup.tar.gz *
rm -R /home/$user/Dropbox
ln -s /pathtowindowspartition/User/Dropbox /home/$user/Dropbox 
cd /home/$user/Dropbox
dropbox start

Solution 2:

AFAIK, yes. This is sort of an "advantage" to Dropbox for Linux. Windows' "links" are actually .lnk files, which are windows-only. (I'm currently wondering how Windows handes Linux's symbolic links, but that's another story...)

It allows you to easily back up things to your Dropbox folder that would not normally be able to be backed up, such as ~/.minecraft. You can simply make the link to a game's config folder, or anything else, and it will work.

As for it pointing to a preexisting folder, you get to choose your Dropbox folder location during the setup. If that's not going to work (e.g., you don't want to reinstall it,) a symlink always works.