I am backing up home folder by create a symlink in dropbox.

What I did:

cd ~/Dropbox
mkdir backup && cd backup
ln -s ~

What I checked:

  1. ln -l. The symlink is created.
  2. The dropbox folder contains my home folder. However, it only contains the link, rather than the actual file.
  3. The web dropbox is empty.

This is weird. Almost all articles and Q&A suggest that dropbox would follow the symlink, and sync the folder.

I suspect that

  1. It is a problem to put home folder under dropbox, because the actual dropbox folder is in home folder.
  2. Is there something wrong with the file permission? Most of the file is 644. However, I have no idea why no file end up in the Dropbox cloud.
  • Is this a typo? mkdir backup && cd bakcup
    – Elder Geek
    Feb 21 '16 at 21:36

Of course Dropbox synced only a link, because that is what you put inside a backup directory. But you can do a little trick that should help:

  1. Stop dropbox
  2. Issue following command:

    sudo mount ~ ~/Dropbox/backup -o bind

  3. Start dropbox

The command mounts (binds) your home directory to be also visible under ~/Dropbox/backup path. Then dropbox will see it and synchronize. But be careful not to start dropbox without doing a mount, as it will start to resync with empty directory and you'll end with your home directory copy downloaded

  • I did as the instruction goes. However, dropbox only sync symlink, rather than file, again. Feb 21 '16 at 22:37
  • @JohnHass: Do. Not. Create. Symlink. Just stop dropbox (completely, you should quit the application), mount your home directory inside dropbox using -o bind parameter and start dropbox again.
    – nsilent22
    Feb 22 '16 at 6:31
  • That's a really interesting solution. But dangerous! as @nsilent22 says, BE CAREFUL. The best idea would be to add that bind command to /etc/fstab to make sure it's always mounted before dropbox starts. Or else one day you will lose everything. Nov 15 '16 at 23:23

I had to

  1. Stop dropbox
  2. mv ~/Dropbox /stf/Dropbox
  3. ln -s /stf/Dropbox ~ # symlink new location into home folder
  4. rm -rf ~/.dropbox ~/.dropbox-dist
  5. run dropbox and relink device

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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