cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox files & folders

Get in sync with the Dropbox Community. Our users can answer all of your questions on files and folders. Join a discussion or start your own.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Best practices for using symlinks (symbolic links)

Helpful | Level 5

Hi there,

I use dropbox on linux with symlinks, but am not sure which is the best/preferred way to use them. Is there a best practice for using this type of configuration?

Currently I use symlinks in my home directory that point to the actual folders in my Dropbox folder, but I have heard of doing the inverse: placing symlinks in the dropbox folder pointing out into the home directory. Are there pros and cons to symlinking from the Dropbox folder to the home directory vs. placing a symlink in the home folder linking to inside the Dropbox folder?

What happens during a catastrophic failure triggering a need for data restoration, which method is preferred? Is there a way to dynamically create links for new entries (like .* folders)? Is there an advantage/disadvantage to using soft vs. hard linking?

Any links/posts with regards to the above would be most appreciated. I acknowledge that Dropbox does not fully support symbolic links, but find them so useful I am committed to using them.

Thanks in advance!

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Best practices for using symlinks (symbolic links)

Dropboxer
Dropboxer
Hey there @zephyr707,
 
I would strongly recommend sticking with the current configuration you currently have, which would be having the actual files in the Dropbox folder and having your symlinks in the home directory. In this case, it wouldn’t have any affect on the files syncing as the actual files are within the Dropbox folder.
 
Issues occur with syncing when the files are located elsewhere and the symlink is within the Dropbox folder instead. This can cause performance issues and high CPU usage when trying to sync the files. In some cases, the desktop app may even just sync the symlink file itself and not the referenced file. This will mean the actual file won’t be synced to your Dropbox account so you wont be able to access the actual file via the web or other devices your account syncs to.
 
Hope this helps, let me know if you have any other questions - Thanks!

Daphne
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

View solution in original post

29 Replies 29
Highlighted

Re: Best practices for using symlinks (symbolic links)

Dropboxer
Dropboxer
Hey there @zephyr707,
 
I would strongly recommend sticking with the current configuration you currently have, which would be having the actual files in the Dropbox folder and having your symlinks in the home directory. In this case, it wouldn’t have any affect on the files syncing as the actual files are within the Dropbox folder.
 
Issues occur with syncing when the files are located elsewhere and the symlink is within the Dropbox folder instead. This can cause performance issues and high CPU usage when trying to sync the files. In some cases, the desktop app may even just sync the symlink file itself and not the referenced file. This will mean the actual file won’t be synced to your Dropbox account so you wont be able to access the actual file via the web or other devices your account syncs to.
 
Hope this helps, let me know if you have any other questions - Thanks!

Daphne
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

View solution in original post

Highlighted

Re: Best practices for using symlinks (symbolic links)

Helpful | Level 5

Hi Daphne,

Thanks for your response, sounds like sticking with the current setup definitely makes sense.

Also, while setting up dropbox on a live usb stick, I just discovered another reason for using symlinks pointing into the Dropbox folder. Doing the inverse would likely cause the data from each separate host to clobber the other host's data. With symlinks pointing the Dropbox folder I know have the same data across hosts that I want to share in common, which is pretty useful.

From what you describe, I guess as a best practice it would be advisable to not drop any symlinks into the Dropbox folder at all as it sounds pretty risky. I hope a better solution to dealing with symlinks is developed, but until then it sounds safe to avoid using them in any way within the Dropbox hierarchy structure.

Thanks for your help!

Highlighted

Re: Best practices for using symlinks (symbolic links)

Dropboxer
Dropboxer
Hey again @zephyr707,
 
It seems like you have everything on point there, this set up will for sure be much more stable. I’m glad I could help to clarify the matter with you. 
 
If you have any other questions about this then please don’t hesitate to reach out to me here - Cheers! 

Daphne
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Highlighted

Re: Best practices for using symlinks (symbolic links)

Helpful | Level 5

Awesome, thanks a lot, Daphne, I feel confident now setting it up this way!

p.s. the little thumbs up like button doesn't seem to be working for me, but cheers for the help! 

Highlighted

Re: Best practices for using symlinks (symbolic links)

Dropboxer
Dropboxer
I’m happy to hear you’re confident with this moving forward @zephyr707!
 
Hope you have a great weekend!
 
PS. Thanks for letting me know that little hiccup there with the like button, I’ll have a look into this.

Daphne
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Highlighted

Re: Best practices for using symlinks (symbolic links)

Helpful | Level 6

Hi there,

I've had this setup (linking my Desktop to the a ~/Dropbox/Desktop for years now. However, I just bought a new Macbook Pro running OS X catalina. Everytime I create the symlink to the Dropbox, it initially works, but then the OS restores what seems like a default folder and deletes the link. 

Any ideas?

Highlighted

Re: Best practices for using symlinks (symbolic links)

Super User II
Super User II

@niazy wrote:

Everytime I create the symlink to the Dropbox, it initially works, but then the OS restores what seems like a default folder and deletes the link.


I can't comment on why Catalina is replacing the symlink with a new folder, but I can say it doesn't matter much anymore. Dropbox has never supported symlinks and recently changed how they sync.

Dropbox will no longer sync the content at the other end of a symlink when the target folder is located outside of the Dropbox folder. i.e., You can no longer use symlinks to sync external folders like your Desktop.

Highlighted

Re: Best practices for using symlinks (symbolic links)

Helpful | Level 6

Thanks Rich,

From reading about the changes, I shouldn't be affected. My link is created in my home directory and links a regular folder in Dropbox. The changes seem to only apply to symlinks created within dropbox.

 

 

Highlighted

Re: Best practices for using symlinks (symbolic links)

Helpful | Level 6

I have found a workaround that may help you guys at Dropbox provide us with a more elegant solution. After creating the symlink to my Dropbox desktop folder, I locked the link file by displaying its info and checking the 'Locked' checkbox. That seems to do the trick. I checked that I can still write and save to my desktop. I have also restarted my machine (this step previously resulted in my link deleted and a new Desktop folder created) and everything is intact. 

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?