{"id":63,"date":"2020-08-17T07:54:04","date_gmt":"2020-08-17T07:54:04","guid":{"rendered":"https:\/\/machine-learning.webcloning.com\/2020\/08\/17\/how-to-get-around-dropboxs-symlink-limitations-on-linux\/"},"modified":"2020-08-17T07:54:04","modified_gmt":"2020-08-17T07:54:04","slug":"how-to-get-around-dropboxs-symlink-limitations-on-linux","status":"publish","type":"post","link":"https:\/\/salarydistribution.com\/machine-learning\/2020\/08\/17\/how-to-get-around-dropboxs-symlink-limitations-on-linux\/","title":{"rendered":"How to get around Dropbox\u2019s symlink limitations on Linux"},"content":{"rendered":"<div readability=\"64.455973864343\">\n<ul class=\"unstyled inline blog-info\">\n<li>\n<i class=\"icon-calendar\"><\/i> February 22, 2020<\/li>\n<li>\n<i class=\"icon-user\"><\/i> <a href=\"http:\/\/blog.datumbox.com\/author\/bbriniotis\/\" title=\"Posts by Vasilis Vryniotis\" rel=\"author\">Vasilis Vryniotis<\/a>\n<\/li>\n<li> <a href=\"http:\/\/blog.datumbox.com\/how-to-get-around-dropbox-symlink-limitations-on-linux\/#respond\">. No comments<\/a>\n<\/li>\n<\/ul>\n<figure class=\"wp-block-gallery aligncenter columns-1 is-cropped\">\n<ul class=\"blocks-gallery-grid\">\n<li class=\"blocks-gallery-item\">\n<figure><img decoding=\"async\" src=\"https:\/\/blog.datumbox.com\/wp-content\/uploads\/2020\/02\/dropbox-file-support-770x433.png\" alt=\"\" data-id=\"948\" data-full-url=\"https:\/\/blog.datumbox.com\/wp-content\/uploads\/2020\/02\/dropbox-file-support.png\" data-link=\"https:\/\/blog.datumbox.com\/?attachment_id=948\" class=\"wp-image-948\" srcset=\"http:\/\/blog.datumbox.com\/wp-content\/uploads\/2020\/02\/dropbox-file-support-770x433.png 770w, http:\/\/blog.datumbox.com\/wp-content\/uploads\/2020\/02\/dropbox-file-support-300x169.png 300w, http:\/\/blog.datumbox.com\/wp-content\/uploads\/2020\/02\/dropbox-file-support-768x432.png 768w, http:\/\/blog.datumbox.com\/wp-content\/uploads\/2020\/02\/dropbox-file-support.png 800w\" sizes=\"(max-width: 770px) 100vw, 770px\"><\/figure>\n<\/li>\n<\/ul>\n<\/figure>\n<p>As of mid-2019, Dropbox announced that they <a href=\"https:\/\/help.dropbox.com\/installs-integrations\/sync-uploads\/symlinks\">no longer support symlinks<\/a> that point outside of the main Dropbox folder. In this tutorial, we show a workaround on Linux that enables us to store in Dropbox any file, even if it is not located within the main Dropbox folder.<\/p>\n<h2>\n<strong>What<br \/>\nis the limitation and why it\u2019s a problem<\/strong>?<\/h2>\n<p>Imagine that you have a bunch of files that you would like to synchronize across your devices, but they are stored outside of your Dropbox folder. For example, assume that your main Dropbox folder is located at <strong>~\/Dropbox<\/strong> but your documents live in the <strong>~\/Documents<\/strong> folder. Up to recently, you had the option to add those files in Dropbox without physically moving them by creating a symlink:<\/p>\n<pre readability=\"5\"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">ln -s ~\/Documents ~\/Dropbox\/Documents\n<\/pre>\n<p>Unfortunately this feature got deprecated by Dropbox. Every folder\/file that was a symlink is now copied and the \u201c<strong>(Symlink Backup Copy)<\/strong>\u201d is appended to it. This means that any changes you make to your original external folders will no longer be visible to Dropbox. <\/p>\n<h2>Working around the limitation using mount<\/h2>\n<p>Thankfully there is a quick and easy solution to work around the limitation on Linux. Below I explain how this can be achieved on Ubuntu, but the process should be similar to other Linux distributions.<\/p>\n<p>To achieve the same<br \/>\neffect, we are going to use \u201cbind mount\u201d. A bind mount enables us<br \/>\nto create an alternative view of the original directory tree in a new<br \/>\nlocation. Any modification on one side is immediately reflected on<br \/>\nthe other, effectively allowing us to share the same data.<\/p>\n<p>To create a bind<br \/>\nmount you can use the following commands:<\/p>\n<div class=\"wp-block-group\" readability=\"6.5\">\n<div class=\"wp-block-group__inner-container\" readability=\"9.5\">\n<pre readability=\"6\"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Create mounting point in Dropbox folder\nmkdir -p ~\/Dropbox\/Documents\n\n# Link the external folder in Dropbox\nsudo mount --bind ~\/Documents ~\/Dropbox\/Documents\n<\/pre>\n<\/div>\n<\/div>\n<p>That\u2019s it! Dropbox should be able to start synchronizing the data. Unfortunately the <strong>mount<\/strong> command does not persist between restarts. To make the change permanent we need to modify the <strong>\/etc\/fstab<\/strong> file by appending:<\/p>\n<p><\/p>\n<blockquote class=\"wp-block-quote\" readability=\"6.5050505050505\">\n<p><strong>WARNING: <\/strong>Editing your fstab file incorrectly can render your computer unbootable. It\u2019s straightforward to <a href=\"https:\/\/unix.stackexchange.com\/questions\/44027\/how-to-fix-boot-failure-due-to-incorrect-fstab\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"recover (opens in a new tab)\">recover<\/a> from this problem but before editing the file, you are advised to do some <a href=\"https:\/\/linoxide.com\/file-system\/understanding-each-entry-of-linux-fstab-etcfstab-file\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"reading (opens in a new tab)\">reading<\/a>.<\/p>\n<\/blockquote>\n<p><\/p>\n<div class=\"wp-block-group\" readability=\"7.5\">\n<div class=\"wp-block-group__inner-container\" readability=\"10\">\n<pre># Add one line for every external Dropbox folder\n\/home\/YOUR_USERNAME_HERE\/Documents\n\/home\/YOUR_USERNAME_HERE\/Dropbox\/Documents none\ndefaults,bind,x-gvfs-hide 0 0\n<\/pre>\n<\/div>\n<\/div>\n<p>Note that adding the <strong>x-gvfs-hide<\/strong> option will allow make Nautilus file manager to hide the mounting points.<\/p>\n<p>I hope that\u2019s<br \/>\nhelpful. Happy Dropboxing. ?\n<\/p>\n<div class=\"authorsure-author-box\" readability=\"8.4210526315789\">\n<img decoding=\"async\" loading=\"lazy\" alt=\"\" src=\"http:\/\/0.gravatar.com\/avatar\/0d9cf005f5d9fbbe42b6723e723a7f76?s=90&amp;r=g\" srcset=\"http:\/\/0.gravatar.com\/avatar\/0d9cf005f5d9fbbe42b6723e723a7f76?s=180&amp;r=g 2x\" class=\"avatar avatar-90 photo\" height=\"90\" width=\"90\"><\/p>\n<h4>About\u00a0<a rel=\"author\" href=\"http:\/\/blog.datumbox.com\/author\/bbriniotis\/\" class=\"authorsure-author-link\">Vasilis Vryniotis<\/a><br \/>\n<\/h4>\n<p>My name is Vasilis Vryniotis. I&#8217;m a Data Scientist, a Software Engineer, author of Datumbox Machine Learning Framework and a proud geek. <a href=\"http:\/\/blog.datumbox.com\/author\/bbriniotis\/\">Learn more<\/a><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/blog.datumbox.com\/how-to-get-around-dropbox-symlink-limitations-on-linux\/<\/p>\n","protected":false},"author":1,"featured_media":64,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/63"}],"collection":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":0,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media\/64"}],"wp:attachment":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}