Backup and Sync Folders with Dropbox and Symbolic Links

DropBox can be used not only for sharing files and taking them with you, but with symbolic links you can turn it into a simple backup solution to automatically keep your files safe when they change.

Sync Folders With Dropbox as a Simple Backup Solution

A great way to backup your files is to sync folders with Dropbox using symbolic links. Backing up files is important. At any time your hard drive could fail, rendering all your files inaccessible. Without a backup, all your photographs, documents, spreadsheets could be gone!

Here we’ll go through using Dropbox as a backup solution and how to use Symbolic Links to automatically Sync files with it.

What is Dropbox and where do I get it?

Here’s part of the tour from the Dropbox website: “Dropbox is a free service that lets you bring all your photos, docs, and videos anywhere. This means that any file you save to your Dropbox will automatically save to all your computers, phones and even the Dropbox website. Dropbox also makes it super easy to share with others, whether you’re a student or professional, parent or grandparent. Even if you accidentally spill a latte on your laptop, have no fear! You can relax knowing that Dropbox always has you covered, and none of your stuff will ever be lost.”

Desktop Icon

Desktop Icon

To download Dropbox and create a free account visit their website. Once you have it installed and logged in you’ll notice you have a new icon on your desktop similar to the one shown here. If you double click on that it’ll open up just like a normal folder. This is your portal into your Dropbox account! Files put in here will automatically sync with your Dropbox profile.

So already you could just manually backup the files you want by dragging them in here. Which is all great and such, if you remember to do it. You could work straight from this directory, but for me I would rather keep my files where I want, physically on my hard drive; this is where the Symbolic Links come in!

What are Symbolic Links?

Here’s what Wikipedia has to say about it: “In computing, a symbolic link (also symlink or soft link) is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.”

This basically means your computer has a shortcut or reference point to an actual file which is stored elsewhere. So what we’ll use it for is almost to trick Dropbox into thinking files on our hard drive are actually inside the Dropbox folder so it syncs them.

Linking Folders to Dropbox with Symbolic Links

These instructions will work with Windows 7 and Vista.

Assuming you have Dropbox installed and have an account as described before you firstly want to check where Dropbox is saved. Double click on your Dropbox icon and click in the address bar to display the path where it’s located. In Windows 7 it should be, by default, C:\Users\yourname\Dropbox.

Search Bar in the Start Menu

Search Bar in the Start Menu

Next you need to open up a command prompt as an Administrator. To do this, Press Start and in the search box (shown to the right) type in cmd. You then want to right click on the cmd icon the search returns and press Run as administrator. This will bring up a black box with a command prompt.

In your command window you want to change to the Dropbox folder. This is the path you noted from the first step. So taking the Windows 7 default path enter the following:

cd "C:\Users\yourname\Dropbox"

Now you will be inside the above directory. Remember to change yourname with the actual folder! Now onto creating the actual link. For this we’ll be using the mklink command. For this you need to know where your files are. If I have a folder inside My Documents called “Work” and I want to use this to sync with Dropbox you would enter the following:

mklink /d "Work" "C:\Users\yourname\Documents\Work"

Specific Example of Creating a Symbolic Link for Dropbox

I thought it would be handy to show a picture of this last command prompt bit, since it can be a little confusing! Here, my Dropbox is located in C:UsersRabDropbox. The folder I want to sync is E:Path ToPicturesHoliday Pictures. Here is all I enter into the command prompt:

cd "C:\Users\Rab\Dropbox"

mklink /d "Holiday Pictures" "E:\Path To\Pictures\Holiday Pictures"

Creating a Symbolic Link for Dropbox

Creating a Symbolic Link for Dropbox

So what now?

You can almost forget about Dropbox. Carry on using and updating your files. Because of your symbolic link it’ll auto update and sync itself with your Dropbox folder! Should your hard drive fail, or you need to access your files from another computer simply login to the Dropbox website to see your files.

Email Newsletter

Enjoy reading here? Why not subscribe and get my very occasional newsletter sent right to you. It's great and stuff.

Comments

  1. Kathie Smith says:

    Hi I have downloaded dropbox so that the family can share photos. How do I download photos from dropbox to my harddrive? It’s driving me nuts :) I have dried everything, even trying a flash drive but it won’t cooperate.

    Help…

    • Hi Kathie, you should be able to use Dropbox like any other folder on your computer. You can also login to their website and download files (and backups) from there. Hope this helps!

  2. Great!

    But how do you delete the link if you need to?

    Thanks

    • Hi Bobby. You can just delete it like a normal folder, so if the link exists in your Dropbox folder you can enter the folder, click on the link and delete it.

      You need to be careful when you delete a symbolic link via the command line – Assuming you’ve made a link to a folder then you should use rmdir rather than del as del will delete the target, whereas rmdir will remove the directory link.

      If you’re unsure, just make a backup to another location then delete the link and verify the source files still exist.

  3. This is great!
    Will this work with Windows XP or is there a way to make it work with XP?

    Thanks

  4. Thanks dude! Works great!

  5. I must say that this helped completely eliminate my manual backup routine. Thanks for sharing! U da man!

  6. I’m really hoping this can help me but I have to use Truecrypt to protect both my portable hard drive and my dropbox folder. Is there a way I can a) set up a link from portable hard drive to dropbox whenever I plug it in. b) create that link between two truecrypted files if I mount them both at the same time?

    • Hi Anna, I’m afraid I don’t have any experience with setting something like that up. However, something like SyncToy might be useful to you. It’s a freeware Microsoft product which gives you a GUI for syncing files and folders. This might work better than a symbolic link as the drive wont always be there.

Speak Your Mind

*

  • 2

    Coffees brewed today

  • 7

    Items on todays agenda

  • 18

    Emails composed today