You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
zephyr707
6 years agoHelpful | Level 6
Best practices for using symlinks (symbolic links)
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 symlink...
- 6 years agoHey 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!
zephyr707
Helpful | Level 6
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
5 years agoCollaborator | Level 8
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.
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.
- numan5 years agoHelpful | Level 6
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
- siamesekitten5 years agoExplorer | Level 4
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.
- numan5 years agoHelpful | Level 6
thanks - i will try this. the article does not mention this working witt Desktop folder. Have you been able to do that?
About 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.
Need more support
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!