How to sync your Mac's Documents, Desktop, and any other folder to Dropbox

There are plenty of reasons to put things into the cloud, be it as a backup or to access them remotely from other devices. But putting things into the cloud can be a hassle — Apple's trying to make it a little more seamless with iCloud but if you're old school like me, that seamlessness just doesn't do it for you. There's something about having all my computer's files neatly organized and accessible that soothes my more obsessive tendencies.

At the same time, I want to be able to access my important files while I'm on the go, and I want to know that they're backed up in case catastrophe strikes. That's where the cloud really comes in. I've got a local Time Machine backup running (two, actually) and I use Backblaze for nightly backups to the cloud, and though I can use Backblaze to access files from my iPhone, it's just terribly slow.

Enter Dropbox

Dropbox, on the other hand, is blazing fast. Uploads and downloads sling through the web as fast as my connection can handle. I can open the Dropbox app on my iPhone or iPad (opens in new tab) and get to all the files in there with ease and speed. But there were two basic options for backing up my files to Dropbox: either copy them over regularly, or just move them onto Dropbox (oh, the humanity).

Turns out, there's another way, one in which you can keep your folders and files right where they are and have them backed up and synced with Dropbox. It all works through the magic of symbolic links.

How does this work?

You might be familiar with alias links on your Mac — it creates a shortcut that points to another file, open the shortcut and it opens that file. A symbolic link is similar, except that instead of creating a pointer it creates a redirect. Whatever you do with the symbolic link (or symlink) is applied to the linked file.

Dropbox works by creating a folder on your computer that is synced with their servers. Place a file in that folder and it's synced to the cloud. Upload a file from a Dropbox app or their web interface and it'll be downloaded onto your computer. Basically, that's it. Thing is, if you want to back up files to Dropbox, copying them into that folder means they're taking up space twice on your hard drive, and just moving them to Dropbox takes them right out of your organizational flow.

Put a tiny symlink into Dropbox and it can back up an entire folder elsewhere on your computer

If you were to create an alias to a file and put that in the Dropbox folder, only the alias would get backed up, and that's not terribly useful. But if you put a symlink into the Dropbox folder, when the Dropbox backup app looks at it it's redirected to the linked file, and it backs that up instead. So with one 25-byte symlink you can back up gigabytes upon gigabytes of data without duplicating it on your computer.

The additional benefit is that you can sync and back up entire directories that would be otherwise difficult to move. You can put your Pictures folder into Dropbox with a symlink or your entire Documents folder. Heck, you could even sync and back up your Mac's desktop files and installed apps.

This sounds too good to be true…

There are some caveats to note here. The first is cost: Dropbox does offer a free tier, and it's a paltry 2GB. That might be enough for you, but chances are if you're planning on putting an entire folder like Documents in there you'll need more space. Thankfully, Dropbox isn't terribly expensive, offering 1TB of storage for $9.99/month. Chances are you'd be able to back up your entire computer onto that if you really wanted to.

There are risks that come with putting your files into the cloud, of course, and they come down to you to manage them. Make sure you have a strong and unique Dropbox password and use pin or Touch ID security in the mobile apps when available.

If you change a file on your phone or with Dropbox on the web, that file will be synced down to your computer, and vice versa.

The biggest risk you run, however, is inherent to Dropbox itself: any changes made to a file in Dropbox are synced to all devices linked to that account. So if you change a file from your phone, that file is saved on the server and synced down to your computer with those changes. If you delete a file from the web interface, it's deleted from your computer. And vice versa. Dropbox does offer paying customers 30 days of stored historical versions and backups of deleted files, but it's still worth noting the risks of what you're wading into here.

Those risks are minor, though. Set and practice good security and be conscious of what you're doing with your files and you'll be in good shape — and your files will be there for you whenever and wherever you need them.

How to sync folders on your Mac to Dropbox

  1. Download and install the Dropbox app from the Dropbox website (download will start automatically).
  2. Once you've got the Dropbox app up and running, open Terminal.
  3. Navigate in Terminal to your Dropbox folder by typing cd /Users/YourMacUsernameHere/Dropbox and then hitting return. A new line in Terminal will appear that's Your-Computer-Name:Dropbox YourUserName$
  4. Create your symbolic link by typing ln -s ~/FolderNameHere and hitting return. A folder will appear in your Dropbox folder with the alias/shortcut arrow and it will immediately begin uploading.
    • To create a symlink to your Desktop, type ln -s ~/Desktop
    • To create a symlink to your Documents folder, type ln -s ~/Documents
    • To create a symlink to any other folder or file, simply type its file path after ln -s ~/FilePathGoesHere — this is useful for if you want to back up most your Documents folder, but not necessarily everything in there (for instance, a 30GB Windows virtual machine from Parallels).
    • To create a symlink to a folder or file with a space in its name, put a backslash before the space, like so: ln -s ~/Documents/Star\ Trek\ Aldrin

Creating symlinks in Dropbox via Terminal

  1. Dropbox will start uploading your symlinked folders.

Symlinked folders syncing to the Dropbox cloud

Now what?

Now you go about using your Mac like you normally would. Any time you edit or create a file in one of your symlinked folders, it'll be automatically uploaded to Dropbox. Any time you remotely edit one of those files, it will be synced back down to your Mac. It's the magic of the cloud.

Advanced: Sync files with another Mac!

This isn't just a handy cloud back-up and storage tool — you can also use Dropbox to sync files between multiple Macs. Yeah, crazy, we know. Just imagine stepping away from your iMac and opening your MacBook at the coffee shop to have all of your important files, even your desktop, synced right over. Here's how to make that a reality:

  1. Get your folder(s) set up on your primary computer as instructed above.
  2. Install and set up Dropbox on your second computer. It will start to download the folder that you symlinked and uploaded from your primary computer.
  3. Wait for both computers to finish syncing. See that little syncing icon on the Dropbox menu bar icon? That means that Dropbox is still syncing. You want just the open box Dropbox icon, no little sync icon. Seriously. Wait for the sync to finish.

  1. Once the folder is fully downloaded, quit Dropbox on the secondary computer. Seriously, quit Dropbox.
    1. Click on Dropbox in the menu bar.
    2. Click on the gear icon in the bottom right corner of the Dropbox menu.
    3. Click on Quit Dropbox.

  1. On the secondary computer, open the Dropbox folder.
  2. On the secondary computer,drag your synced folder out of the Dropbox folder and into the location where you want it to be. In the case of Documents or Desktop, you'll be replacing an existing folder in your user folder (get to that by opening Documents or Applications and hitting cmd + up arrow).
  3. On the secondary computer, open Terminal and navigate to your Dropbox folder by typing cd /Users/YourMacUsernameHere/Dropbox and then hitting return.
  4. On the secondary computer, create a symlink to the folder you dragged out of Dropbox by typing ln -s ~/FolderNameHere and hitting return.
  5. Double check that both the primary and secondary computers have identically-named symlink files in the exact same Dropbox folder locations.
  6. Re-start Dropbox on the secondary computer (it's in Applications) and give it a moment to sync. If all has gone well, there won't be anything to sync since both folders are identical.

And that's it. Now when you change a file in your symlinked folder on one computer, it will be uploaded to Dropbox and immediately downloaded onto the other computer. Voilà, you're in sync.

Any questions?

Let us know in the comments!

Derek Kessler

Derek Kessler is Special Projects Manager for Mobile Nations. He's been writing about tech since 2009, has far more phones than is considered humane, still carries a torch for Palm, and got a Tesla because it was the biggest gadget he could find. You can follow him on Twitter at @derekakessler.

  • I recall doing this a while ago to backup my iCloud documents (this was before the iCloud drive).
    Is there a way to check to see if you still have a symlink in place? What is the method to remove it?
  • Just tried this but it does not work, at least not for me. The symlinks are created but nothing uploads.
  • Yeah, I had the same issue awhile back trying todo this on Mavericks,.. I found a utility called "MacDropAny" that creates the symlinks for you, and in this case it worked for me. I also used it to create a symlink to a folder on an external hard drive, and that worked as well,..
  • What that program does is moving your original folder to the dropbox folder and then creates a symlink to the old place.
  • It'd be nice to hear about more options for direct syncing between two Macs, without going through any third-party services. I have been using a program called Unison for many years to do just that. At the end of every work day, I fire it up, and it synchronizes all the files I've changed during the day back to my home machine. Late in the evening, I do it again, to sync anything I worked on while at home. But Unison doesn't seem to have active support any more, and usually there is only a Mac GUI for older versions. (The GUI is nice, showing you at a glance what has changed and which files need to be copied in which direction; you can even hit a button to pop up the output of "diff" on text files that have changed). I've been wondering if there's something nicer. (I don't just want to use rsync; even though I'm a command-line kind of guy, I want a nice and simple GUI for file syncing, since I sometimes update hundreds of files during the day, and a GUI makes it easier to look them over at a glance).
  • Check out BitTorrent Sync, that may work for you. Sent from the iMore App
  • I'm assuming the same thing works if using Google Drive or MS OneDrive as well?
  • In theory it should, but in my testing I was unable to get Google Drive or OneDrive to act on symlinks.
  • Thanks - great article but a bit of a scary process. It would be great if Dropbox built a facility straight into their service to flag folders outside the Dropbox folder for syncing. Could you do an article about how to move your iTunes and Photos library into a cloud storage folder like Dropbox? I think this is probably the way I would choose to do this? Also how much syncing traffic do iTunes or Photos create - presumably just a few files get changed regularly.
  • Terminal looks scary, but it's not really that bad, especially in this regard. You're not typing anything remotely near the sort of stuff that can royally eff your system. Using symlinks: Photos: ln -s ~/Pictures Music: ln -s ~/Music (this will include any movies in iTunes) The biggest rocks that will get synced through Dropbox with either are the media files — your images and music. Once those are done, you're looking at relatively small (and mostly hidden from sight) files that define things like photo albums, playlists, and the like.
  • I use XtraFinder on my Mac to enhance Finder features and that has creation of Symlinks built in. Sent from the iMore App
  • Yup. Love that XtraFinder. Sent from the iMore App
  • Great tip, but how do you cancel the symlink again. If you delete the folder from Dropbox you also delete it from your computer. The problem is that the folder you backup to Dropbox now takes up double space on your Mac.
  • You just delete the symlink to stop it. And no, it doesn't take up double space — there's just the symlink (which is all of ~25 bytes).
  • You are right. Thanks :-)
  • Can you give specific directions about how to delete the symlink?
  • This is a great!! idea. I keep my current working folders on my Desktop, so making a symlink to the Desktop was my first move. I have 1T of storage on DropBox so this is a no brainer. I cannot thank you enough for this tip. I have quite a few Gigs of data in those folders and now I can access them from my iPad or anywhere I have DropBox access. Terrific!
  • Great article.
    I wonder if this would work with my NAS. It's a Netgear ReadyNAS, it has a DropBox like feature called ReadyDrop, but I don't use it bc I'd rather my files stay where they are, and manually copying them is a pain with duplicate date. I'll give it a try and report back. Sent from the iMore App
  • I was giving up Dropbox lately. Cause 2 Gb space was not enough. But I found a way to expand it 18 Gb. With service. Now that's enough for my documents. Pics goes to Google Photos. FREE yay! :)
  • The instructions as written did not work for me. I made the following changes to create a viable symlink: 1. I located the folder (which I named "Symlink1") on the desktop of my primary computer (iMAC).
    2. Used Terminal command « cd /Users/YourMacUsernameHere/Dropbox « which returned the correct directory.
    3. Used « ln -s ~/Desktop/Symlink1 « to place Symlink1 into Dropbox. (This worked.)
    4. Quit and restarted dropbox on my primary computer.
    5. Quit and restarted Dropbox on my secondary computer (Macbook Air)
    6. Dragged Symlink1 from Dropbox to the desktop of the secondary computer.
    7. Repeated Terminal commands as per instructions using « ln -s ~/Desktop/Symlink1 «;
    8. Quit and restarted Dropbox on my secondary computer. Outcome
    Symlink between Dropbox and primary computer was broken; new symlink established with Macbook Air functional. What am I missing?
  • I tried to sync my work desktop with my macbook desktop. I successfully created the linked desktop folder from my work mac in my dropbox folder, however when I attempted to drag the synced desktop folder from the dropbox folder to the secondary computers user folder I get an error about my macbook desktop folder not being able to be modified or deleted because its required by OS X. Any help would be appreciated. Thanks.
  • First part works really well, but i have the same problem as above connecting the second computer, gives an error about my desktop folder not being able to be modified or deleted because its required by OS X.
  • Great instructions , I just followed them on my Mac mini and Macbook pro. The process went as smooth as glass.
  • I'd like to transfer ALL the pics on my iPad to my Dropbox, so that I can then delete the lot from my iPad (which is getting full up).
    How do I do this, and are there are any problems foreseen - for example, once I've deleted the lot from my iPad, will they still exist in Dropbox? Thanks.
    Allen, London
  • Could you please tell me how I can have dropbox sync a particular file (not a folder) that is within the Documents folder. I can not move this particular file to any other folder as it is used by an application called Expense Detective that requires this data file to be Documents folder. I do not have the Documents folder with the dropbox folder hierarchy as I do not want to sync the Documents folder.
  • You can use the same symlink tools to point to a specific file: ln -s ~/document.txt
  • Derek, I am curious: why do you recommend a symlink and not a hard link? Couldn´t that help for those for whom the symlink route didn´t work, or are there any drawbacks in using a hard link? Another question, do you think that this method should also work with other cloud services, like OneDrive? Thanks!
  • Personally, it's a matter of organization preferences. I like having all my stuff in Documents where apps are always first look for it. I'm using symlinks to sync and back up every Documents folder but my Parallels virtual machines (20GB files that are updated every time they're used), as well as my Pictures and Music folders. This leaves them all exactly where they're expected to be without having to do any fancy retargeting to get iTunes or Photos to look in a different spot. Sadly, OneDrive and Google Drive do not like symlinks. I tried, but they just refuse to play ball.
  • Hello,
    I have same problem as ChefDTA and JamesTobiasME
    when I attempted to drag the synced desktop folder from the dropbox folder to the secondary computers user folder I get an error about my macbook desktop folder not being able to be modified or deleted because its required by OS X. Any help would be appreciated. Thanks.
  • Like a number of people here, I am having a problem in that OS X won't allow me to replace the Documents folder. How do you get around this?
  • Hi there, is it possible to point out how to undo this. I see other have asked how to delete the symlink that would be useful, as i don't want to do this and then have problems down the line if I need to undo the options. Thanks in advance
  • Undoing is as straightforward as opening the Dropbox folder on your Mac and moving the Symlink to your Trash. You might have to get onto your Dropbox web interface to delete the rest of the files from there, but once you've removed the Symlink on your computer then there's nothing telling Dropbox to look at Folder X for syncing.
  • Do u simply move the alias desktop and documents folders to trash ?
  • Yep.
  • Hi,
    I have same problem as xoxixox and ChefDTA and JamesTobiasME
    when I attempted to drag the synced desktop folder from the dropbox folder to the secondary computers user folder I get an error about my macbook desktop folder not being able to be modified or deleted because its required by OS X.
  • This is gold! Was ready to throw dropbox app off cause it took up space which was silly because the cloud is there for EXTRA space...
    Only downside I thought of.. If I delete some files cause they're online so I don't want them on my ssd anymore, it's also gone from dropbox?? That's the great downside, cause then we're back to square one...
  • The idea is to mirror your folders onto Dropbox. They're still on your computer, but you don't have to duplicate folders to have them synced or backed up via Dropbox.
  • I've got good news! Dropbox's Project Infinite will let you have cloud files listed on your Mac but not on it taking up storage space until you actually need them!
  • What a wonderful system, I used it to set up Symbolic Links to upload many of my User Folders to Dropbox. Unfortunately I think I went one step too far when I later set up a Symbolic Link to upload my user library to Dropbox. Seems my library has one or more huge invisible files (possibly a Superduper Log?) which are taking forever to upload at my slow connection speed. can I cancel this Symbolic Link - I guess there is a Terminal command for that?
  • Sorry, I should have read more of the earlier posts. Remove the folder from dropbox seems to be the answer.
  • This is the response I got back from Dropbox when I tried to create a symlink to my home directory: "We do not support the use of symbolic links or symlinks. Because symlinks may reference locations where Dropbox may have limited accessibility, they can cause various issues. High CPU usage, poor syncing performance, permissions issues and quota usage disparities are a few of the problems that often come up when symlinks are added to the Dropbox folder. We recommend that you remove these symlinks from your Dropbox account. You can do that by following the file paths that are provided when you run the command, and remove the files in your Dropbox folder by dragging them elsewhere on your computer (if you don't want them deleted). After you've removed all of the symlinks you can identify from the Terminal command, please quit Terminal, open it again, and run the command again to ensure that no symlinks remain in your Dropbox folder. If the symlink pathway is part of a single file that is visible in your Dropbox folder on your computer, this symlink may be part of a container file. Container files look like regular files if you look at them on your computer, but they're actually wrappers that contain other file types inside of them. These may include files necessary for the application to run properly and load all the components that the file requires. Some examples of these types of files are iPhoto libraries, Aperture files or iWork files. In these cases, you may want to remove the entire container file, rather than just the symlink itself, as removing just a component of the container file could damage the container file and therefore you may have problems when opening it. In general, we recommend users move the actual folders into the Dropbox folder and then symlink back to the original locations. Please just keep in mind that we don't generally support the use of symlinks due to the issues that can arise when they are added to Dropbox. After you remove the symlinks, it can take some time for syncing to get back to normal. I recommend restarting your computer and then checking on the status of Dropbox. Please give the application some time to re-index and begin the sync process again."
  • Restarting this thread because of the new issues with Sierra. I set up two symlinks: 1 for my downloads folder, and one for a folder on my desktop. Since I installed Sierra I've been getting warning messages from Dropbox about issues with interaction between Sierra and Dropbox and symlinks; the link is below. I do not intend to use optimized storage, but I do want to keep using iCloud to keep contacts and keychain and notes, etc up to date on other devices. I also am not used to using terminal, so I don't know how to remove the symlinks I set up. Some people in their responses above have said to simply delete the duplicate folder from Dropbox; in other places the concern was raised that that might delete all the data. Questions: since I am not using symlinks for Desktop or Documents, and I am not using optimized storage, do I need to be concerned? Second: if I choose to remove the actual symlink I set up in terminal, what specific commands do I use? Third: or is it safe to just delete the folder in Dropbox on my Mac? Thanks.