• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • About
    • Stephen Foskett
      • My Publications
        • Urban Forms in Suburbia: The Rise of the Edge City
      • Storage Magazine Columns
      • Whitepapers
      • Multimedia
      • Speaking Engagements
    • Services
    • Disclosures
  • Categories
    • Apple
    • Ask a Pack Rat
    • Computer History
    • Deals
    • Enterprise storage
    • Events
    • Personal
    • Photography
    • Terabyte home
    • Virtual Storage
  • Guides
    • The iPhone Exchange ActiveSync Guide
      • The iPhone Exchange ActiveSync Troubleshooting Guide
    • The iPad Exchange ActiveSync Guide
      • iPad Exchange ActiveSync Troubleshooting Guide
    • Toolbox
      • Power Over Ethernet Calculator
      • EMC Symmetrix WWN Calculator
      • EMC Symmetrix TimeFinder DOS Batch File
    • Linux Logical Volume Manager Walkthrough
  • Calendar

Stephen Foskett, Pack Rat

Understanding the accumulation of data

You are here: Home / Everything / Apple / Keep Multiple Macs in Sync with Dropbox

Keep Multiple Macs in Sync with Dropbox

March 3, 2011 By Stephen 11 Comments

Warning! This “symlink” technique is not compatible with macOS Sierra iCloud Sync, part of the “Optimize Storage” feature. It will result in data loss! Either turn off iCloud Sync or revert to the standard Dropbox folder locations!

I love my 27″ iMac, but it’s a little tough to take it on the road. So I like to keep my Documents folder in sync between it and my MacBook pro. I’ve recently switched to a new method that uses cloud storage service, Dropbox, and am thrilled with the result. Read on for my document synchronization formula!

You might also want to read How Google and Dropbox Revolutionized My Laptop Migration

The Challenge of Synchronization

Keeping multiple machines “in sync” has always been a challenge. Ever since struggling with LapLink way back in the 1990’s, I’ve been looking for a better way.

Once I moved to Mac OS X, with its UNIX underpinnings, I began using rsync to move data back and forth. But rsync needs to be pointed in the right direction: It’s great for making sure the latest version of “this” is “over there” but not much help when trying to determine which is newer.

Early last year, I switched to the excellent open-source application, Unison. Like rsync, Unison optimizes the movement of data between multiple machines. But it detects which data is newer on a file-by-file basis and prompts before acting.

But Unison only runs on demand and requires interaction and attention. I also didn’t feel comfortable exposing it to the Internet, so both computers had to be on the same LAN.

Introducing Dropbox

I never expected Dropbox to be part of my dream synchronization solution, but that’s what it’s become. Dropbox mirrors local data to the cloud, allowing files to be made available through a web browser or mobile app. It can share a folder between multiple computers, and even multiple users.

By default, Dropbox syncs a cache folder with the cloud, rather than data in other locations

But data in Dropbox “lives” in Dropbox. Drag a file into your Dropbox folder and it now “lives” in the Dropbox cache and cloud. If the cache exists on the same drive as the original location, the file will be moved; it it is on another disk, a copy will be made. Either way, the original location is no longer relevant: Only the copy in the Dropbox folder will be synchronized.

Symlink to Sync

But I didn’t want to live out of the cache folder. I wanted my data to remain in my Documents folder. It’s not obvious how to do this with Dropbox, but a few FAQs and tools exist to make it happen.

Put a symbolic link in the Dropbox cache folder and it will sync files from any location!

The Dropbox application will follow symbolic links in the cache to discover data to synchronize, and this is the secret. Simply create a symbolic link (“symlink” for short) to another folder and you can leave your data wherever you want to!

There are two essential tricks to make this happen:

  1. The folder symlinks in the Dropbox cache folder must have the same name
  2. Dropbox must be turned off on all but one computer when initially setting all this up

A great little app called MacDropAny even exists to facilitate this process, and it’s not too difficult if you follow these rules.

Warning! Do not try this in macOS Sierra with iCloud Sync! Data loss will result!

Step By Step Instructions

Make sure you follow these instructions to the letter. Failure to turn off Dropbox, for example, can result in data loss! Good thing Dropbox keeps old copies available for recovery!

These instructions assume you have two Apple Macintosh computers, named “Computer 1” and “Computer 2”, and that the Dropbox client and MacDropAny application are installed on both. A similar method will presumably work with Windows computers, but that’s left as an exercise for the reader!

Note: You must start with exactly-identical folders on both computers. The easiest way to ensure this is illustrated below, but there are other methods (rsync, for example).

  1. In Finder on Computer 1, drag a folder from any location and drop it on the MacDropAny application in the Applications folder. For example, I dropped the folder, “~/Documents/Example”.
  2. MacDropAny will ask where to create the link. Select a location in your Dropbox cache. For example, I created a folder called “~/Dropbox/Documents” and selected that.
  3. MacDropAny will ask what to name this symlink. It is critical that this name be the same on both sides, and I suggest using the default name, that of the source folder. In my example, I called my symlink “Example” so the full path is “~/Dropbox/Documents/Example”.
  4. Dropbox will discover, index, and synchronize this folder on both computers. You must wait until this process is finished before proceeding to the next step!
  5. Did you wait until it’s finished? Really? Did you check both computers? Click the Dropbox icon on both, just to be sure it’s not still synchronizing.
  6. Quit Dropbox on Computer 2. This is very important. You can leave it running on Computer 1, but it must not be running when you perform the next step!
  7. On Computer 2, open the Dropbox cache folder. Note that the symlink will show up as a real folder full of files here. Drag-and-drop this folder to the desired location. In my example, I dragged the folder “Example” from “~/Dropbox/Documents” to “~/Documents”.
  8. Still on Computer 2, drag this new folder and drop it on MacDropAny.
  9. Select the same folder in the Dropbox cache and give it the same name. This is absolutely critical. In my example, the symlink went back in “~/Dropbox/Documents” and was called “~/Dropbox/Documents/Example”.
  10. Check to make sure both computers have identically-named symlinks in the exact same location in both Dropbox cache folders.
  11. If you’re really sure, start the Dropbox application on Computer 2 and let it discover, re-index, and sync the folder. The synchronization should be very quick since no data has to be moved.

That’s it! Now when you edit a file in “~/Documents/Example” on one computer, it will automatically and nearly-instantly show up on the other computer, as long as both are connected to the Internet. And if you do it offline, these changes will queue until you reconnect. You’ll also have access to these files online and through the mobile Dropbox app. Nice!

Caution!

This really isn’t difficult, but make sure you don’t take any shortcuts. Dropbox will automatically delete the whole folder if you forget to turn it off while creating the symlink on the second computer, and it will delete any missing files if you try to use an incomplete copy. Monitor the “Events” tab in your Dropbox web page to make sure you didn’t lose any data, and restore any accidentally-deleted files from there as well.

This makes it well-suited for keeping multiple “Documents” folders in sync, but isn’t always desirable. Some applications (notably iPhoto) don’t want to sync individual files, they want an entire bundle of files to be consistent. So this isn’t a perfect Mac-syncing solution. It does work for individual files usually found in the Documents folder, but be cautious. Don’t open the same file on two machines simultaneously, for one thing.

You might also want to read these other posts...

  • How To Connect Everything From Everywhere with ZeroTier
  • Electric Car Over the Internet: My Experience Buying From…
  • Liberate Wi-Fi Smart Bulbs and Switches with Tasmota!
  • Introducing Rabbit: I Bought a Cloud!
  • How To Install ZeroTier on TrueNAS 12

Filed Under: Apple, Everything, Personal, Terabyte home Tagged With: Dropbox, iCloud Sync, MacDropAny, macOS, rsync, Sierra, sync, Unison

Primary Sidebar

It is often easier to ask for forgiveness than to ask for permission.

Grace Hopper

Subscribe via Email

Subscribe via email and you will receive my latest blog posts in your inbox. No ads or spam, just the same great content you find on my site!
 New posts (daily)
 Where's Stephen? (weekly)

Download My Book


Download my free e-book:
Essential Enterprise Storage Concepts!

Recent Posts

How To Install ZeroTier on TrueNAS 12

February 3, 2022

Scam Alert: Fake DMCA Takedown for Link Insertion

January 24, 2022

How To Connect Everything From Everywhere with ZeroTier

January 14, 2022

Electric Car Over the Internet: My Experience Buying From Vroom

November 28, 2020

Powering Rabbits: The Mean Well LRS-350-12 Power Supply

October 18, 2020

Tortoise or Hare? Nvidia Jetson TK1

September 22, 2020

Running Rabbits: More About My Cloud NUCs

September 21, 2020

Introducing Rabbit: I Bought a Cloud!

September 10, 2020

Remove ROM To Use LSI SAS Cards in HPE Servers

August 23, 2020

Test Your Wi-Fi with iPerf for iOS

July 9, 2020

Symbolic Links

    Featured Posts

    What You See and What You Get When You Follow Me

    May 28, 2019

    vSphere 6: NFS 4.1 Finally Has a Use?

    February 3, 2015

    Here’s Something Your Raspberry Pi Can’t Do: Gigabit Ethernet and SATA in the Olimex A20-OLinuXIno-LIME2

    May 25, 2016

    Follow the Yellow Brick Road to the Software-Defined Future

    November 29, 2012

    Datacenter History: Through the Ages in Lego

    October 22, 2013

    Why Are PCIe SSDs So Fast?

    June 12, 2013

    Are You a Hypervisor Hugger or a Storage Stalwart?

    November 14, 2011

    Microsoft’s Big Chance to Change

    August 23, 2013

    The 2018 iPad Pro is a Beast!

    November 9, 2018

    My Advice For New Business Travelers: Get The Credit Cards!

    March 20, 2014

    Footer

    Legalese

    Copyright © 2022 · Log in