cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Create, upload, and share

Find help to solve issues with creating, uploading, and sharing files and folders in Dropbox. Get support and advice from the Dropbox Community.

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

Best practices for using symlinks (symbolic links)

Best practices for using symlinks (symbolic links)

zephyr707
Helpful | Level 6
Go to solution

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!

32 Replies 32

AnotherAnon
New member | Level 2
Go to solution

Reality check here.  a) I use a symlink to include my Desktop accross multiple devices.  b) I'm NOT moving my Desktop in the 'Dropbox' folder.  Th systems require it to be right where it belongs.

So I guess it's Good Bye after many years of what was a great service.

 

Fle1
New member | Level 2
Go to solution

Agree with AnotherAnon,

I also use symlinks to have all my devices Desktops available on the cloud. I cannot move my Desktops folders to dropbox folder.

What a stupid change by part of Dropbox! If Dropbox do not remediate this soon i will also say goodbye to Dropbox....

JodyB
New member | Level 2
Go to solution

Unfortunately, this has broken my use for Dropbox as well.  I always understood it wasn't a supported option, but to completely remove it has also removed the usability of your product.  Not a good way to treat your customers.  

Peter S.32
Collaborator | Level 8
Go to solution

I will cancel my Dropbox abonnement immediately if this is really taking place in linux (I am not sure whether it happened right now, would be shocking for me). I do not know why those stupid companies break such valuable functionality all the time. I cannot move the files to the actual dropbox folders, because they are spread over six or seven different computers, on disks mounted with NFS, and some folders are mapped with symbolic links into the dropbox on my main Linux server, which is my cloud backup.

Alternatively, I could export the relevant folders individually with nfs and mount them into the Dropbox. Would this work? What would happen if a connection and thus the mount fails, and there is only the empty mount point? Would the data in the cloud be erased?

"High CPU use" is just a symptom for buggy programming, the symbolic links cannot impose a fundamental problem. It rather shows that Dropbox has lost it's interest to fully support Linux. I'm very disappointed with Dropbox. I think they will quit bussiness soon; they have lost their edge over the competitors. 

zephyr707
Helpful | Level 6
Go to solution

I'm the OP and I marked this resolved b/c I wanted to know the best practices for using Dropbox with symlinks on Linux. Granted, as others have mentioned, it is not ideal, but I'd rather backup via a method that is blessed by Dropbox and not lose my data.

For those with multiple Desktops (or any other directory like Pictures, Music, Videos, etc) across different hosts, my solution has been to create separate host parent dirs with the relevant dirs to backup and then symlink from the host into this hierarchy. I agree it is not ideal, it seems like it would be a lot better to symlink from within Dropbox out to the folder, but Peter S.32 tangentially brings something up I had not thought of: if you symlink from within Dropbox out to a folder and that link gets broken, will Dropbox just zero out the data until the link gets fixed? That seems risky to me and I don't feel like testing it, so I'm sticking with my setup.

If anyone has moved on from Dropbox and cares to share their experience, please do post (thanks jsparks), thanks! I've been looking at a few other options as well since Dropbox seems to not be able to figure out how to backup iOS burst photos (they blame apple/iOS), but google photos has been able to for a while. 

cheers

Peter S.32
Collaborator | Level 8
Go to solution
Sorry, but you just quote a problem which I mention in my post. I suggest to read it again. Yet, I will discuss possible solutions:
If a mount or symlink breaks, the sync demon must handle that correctly. This means: no syncing action whatsoever in those folders, as if there was no internet connection at all. The other folders, however, should be synced as usual. Once the symlink or mount goes valid again, the folder should be rechecked and synced, as if I had worked offline. I think this is what the user expects, isn't it?
The question is how to achieve that. This is an entirely technical question, and Dropbox was always leading in robust syncing, so I think their engineers do not need my help here. However, as you ask, there are several possibilities:
1) The demon should remember and check whether a directory is a mount point, or a symbolic link, by using the information provided by the file system. If it is, it should be checked whether the connection is just down, or whether the user actively changed it (e.g. by replacing a symbolic link with a local directory or vice versa). If the user's purpose is clear, it should be respected. If the demon cannot figure it out, a "conflicting copy" of the folder should be created.
2) A hidden file in every directory, marking it as that which was actually synced, when and with what, will help the demon a lot in figuring out what should be done. If a mount fails, it will show up as an empty directory, without the marker file. It should be igored, but shown as "offline" in the Web-interface. If the user deletes the marker file, a "conflicting copy" of the whole folder could be created, if there are any binary differences of the files. The marker files also help if a file system does not show links and mounts properly, and will even help against circular hard links.
3) If everything failed (e.g. because of a "bug" in Windows with the purpose of tricking Dropbox into deleting files) there is still the possibility to recover lost files.

It is just a technical problem.

numan
Helpful | Level 6
Go to solution

Fopbox support page here (https://help.dropbox.com/installs-integrations/sync-uploads/symlinks) says…

 

If you wish to have a directory available both in Dropbox and another location on your computer, you can put the target directory in Dropbox and the symlink outside of the Dropbox folder. By doing this, you will be able to have the file in both places and the contents will be backed up by Dropbox.

 OK - so how about someone telling us how to acheive that for the required Desktop and Downloads folder in MacOS. If the answer to that is "it cant be done" then it sounds like Dropboxx has either A) lost a game of cat and mouse with Apple's competing iCloud sync and feels it cant win so is giving up or B) is trying to reduce it's own costs per user by eliminating hi-frequency change folders.

 

I am really really hoping there is a solution to this that someone can document in steps that are followable without being a UNIX expert

 

siamesekitten
Explorer | Level 4
Go to solution

I'm a Mac consultant and I've been using the below excellent directions from ZDNet to sync Desktop and Documents folders across multiple computers via Dropbox for years. Also works for single computers, of course. Works perfectly and uses the method Dropbox recommends/supports. I've got literally dozens of clients using it. If you have a problem with the symlinks getting deleted, lock them, as mentioned earlier in this thread. 

 

https://www.zdnet.com/article/beyond-icloud-syncing-your-desktop-and-documents-between-macs-using-dr...

 

 

numan
Helpful | Level 6
Go to solution

thanks - i will try this. the article does not mention this working witt Desktop folder. Have you been able to do that?

siamesekitten
Explorer | Level 4
Go to solution

Yes, I always do both documents and desktop folders. They work exactly the same.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Anon 2 Explorer | Level 3
  • User avatar
    jsparks Helpful | Level 5
  • User avatar
    anonymous Not applicable
  • User avatar
    siamesekitten Explorer | Level 4
  • User avatar
    numan Helpful | Level 6
What do Dropbox user levels mean?