Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
zephyr707
7 years agoHelpful | Level 7
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 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!
- 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!
32 Replies
Replies have been turned off for this discussion
- Fle16 years agoNew member | Level 2
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....
- JodyB6 years agoNew member | Level 2
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.326 years agoCollaborator | Level 8
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.
- zephyr7076 years agoHelpful | Level 7
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.326 years agoCollaborator | Level 8Sorry, 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. - numan6 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
- siamesekitten6 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.
- numan6 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?
- siamesekitten6 years agoExplorer | Level 4
Yes, I always do both documents and desktop folders. They work exactly the same.
- anonymous6 years ago
I just discovered that Dropbox is replacing my symlinks in my home directory with a copy of the files linked to. For example, I had this symlink, "ln -s /share/xxx/whatever /home/me/whatever" and it looks like Dropbox replaced that symlink with a copy of the entire subdirectory /share/xxx. I use symlinks a lot, and now I have duplicate copies of files everywhere. What I'd like is to have Dropbox leave my symlinks alone! If I can't find a solution for this I'll be looking elsewhere for my backup!!!
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.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!