dropbox4

We all know that our computers will crash someday, and we all know that we need to make backups of our files to keep our work safe.

The hassle is that a lot of backup methods are tedious and time wasting to keep going. We want to have a backup system that we can set up, and then forget about it.

We’ve already shown you how to keep a WordPress database safe, but in this post we are going to look at the rest of your blog and theme files, as well as client files or any other important documents you keep.

Here’s what we’ll be talking about:

  • What is Dropbox?
  • Securing your blog folder.
  • Why use Dropbox for backing up client files.
  • Creating symlinks to preserve your current folder structures.
  • Collaborating with others on blog posts, design files etc.

What is Dropbox?

There’s a good chance you’ve heard of it already, but anyway, Dropbox is a free service which offers you 2GB of storage space online.

You install the program on your computer, and it creates a “Dropbox” folder in your Documents folder. From then on, anything that goes in the folder gets copied up to Dropbox as well, instantly.

The nice part is that you can install Dropbox on as many computers as you want, so your files are accessible from anywhere (Including a regular web interface).

dropbox5

So, let’s start by signing up. If you use this link, you will get the free 2GB + 250MB of extra space. That’s because of Dropbox’s “Invite a Friend” program, which you may as well take advantage of!

Alternatively, here’s the regular homepage link. Just download and install the program, and you can sign up as part of the installation.

Securing Your Blog Folder and Client Files

When you installed the program, you specified a location for your Dropbox folder (Most likely; My Documents > My Dropbox, if you’re a Windows user). We’re going to copy our blog files into this folder.

With WordPress, upgrades now take place on the server, so the likelihood is, the core WordPress files on the server will always be different to the ones on your computer (Unless you’re very meticulous about keeping the two in sync).

Fortunately, those files aren’t important. You can always re-download them from WordPress.org if the worst happens. For that reason, we’ll stick to just 3 folders.

Load up your FTP client, and download a copy of the following:

  • wp-content/themes/
  • wp-content/plugins/
  • wp-content/uploads/
  • Optional: You may want to download your .htaccess file if you have edited it, and your wp-config.php file for your database options.

These 3 folders combined with your database backup, mean that you’ll always be able to recreate your site exactly as it was.

Now simply copy all of the files into the Dropbox folder on your computer and Dropbox will take care of the rest.

Why Use Dropbox for Client Files

There are some great ways to backup all of the files on your computer, but the problem is that they have to be scheduled, e.g. to happen once a day.

So if your computer dies, you’ve lost at least 1 day’s work.

That can be a costly mistake, but one that Dropbox would avoid. While working on files saved in your Dropbox folder, every time you click save, the saved file is copied up to the server.

Dropbox as a Version Control System

Dropbox also keeps a record of previous versions of the file, so it works as its very own personal version control system.

Check out this screenshot; it’s of the web interface for a WordPress style.css file I’ve been working on. I can roll it back to any previous version I like if anything goes wrong in the current one (Like accidentally overwriting the whole file with a different one…).

Click to see in full size:

dropbox1

Setting Up Dropbox For Client Files

The best way to work with client files within Dropbox is to set up 2 folders for your client files:

  • Current Clients
  • Past Clients

Current Clients is where you put all of the files you are currently working on. This is the folder that you should put in your Dropbox.

Past Clients can then be backed up to an external disk, or any other normal backup method.

You are unlikely to go over the 2GB freebie limit this way, and Past Clients files won’t change often so a daily backup will cover them 99% of the time.

Creating Symlinks to Preserve Your Folder Structure

A symlink (symbolic link) is like a folder pointer. Let’s say your original folder is here:

My Documents/Work/2009/ABC

But you’d like to be able to access that folder just by going to:

My Documents/ABC

Then you could create a symlinks for My Documents/ABC that would take you to the real folder any time you clicked it (or any time a program accessed it).

Dropbox and Symlinks

If you have a nicely organized folder on your computer for all of your client files, or your blog files, then you may not like the idea of moving the most important folder from each to a separate location.

With symlinks, we can avoid that:

  • Cut and paste the folder (e.g. “Current Clients”) from the original location, into your Dropbox folder.

    (Important: the original must be put into Dropbox. If you do this the other way around, files will only be backed up each time Dropbox loads)

If you are a Windows user, continue reading here for how to set up the symlink. For Mac and Linux users, Dropbox themselves have a good guide on setting these up.

  • In Windows, go to Start > All Programs > Accessories > Command Prompt.

dropbox2

  • Windows Vista and Windows 7 users can then type, for example: (all on one line)

    mklink /D "C:\Users\YOURNAME\Documents\Web\Clients\Current Clients" "C:\Users\YOURNAME\Documents\My Dropbox\Current Clients"

    The first path in quotes is where you would like the symlink to be placed. The second is for the folder in Dropbox that you would like it to point to. And don’t forget to replace YOURNAME with your name on the computer.

  • Windows XP users will need to download Junction, and then type a similar command: (All on one line again)

    junction "C:\Documents and Settings\YOURNAME\My Documents\Web\Clients\Current Clients" "C:\Documents and Settings\YOURNAME\My Documents\My Dropbox\Current Clients"

Now you can browse and find your clients folder in the same place it always has been, but you’ll actually be working on files in your safe and secure Dropbox folder!

Collaborating With Others

Folders can be shared with anyone else with a Dropbox account. Every person can edit and add to the files in the folder, and Dropbox will keep a copy of the revisions.

Just right click the folder, and select “Share This Folder” from the Dropbox menu.

dropbox3

You’ll be taken to a screen where you enter the email addresses of the people to share with, and it’s a simple as that.

There are a lot of options for collaborating online (e.g. Google Docs), but here are a few examples of where this could come in useful:

  • Working with authors on your blog who prefer to type their posts up in Word first.
  • Collaborating with another designer on a PSD for a client.
  • Working with another coder on a WordPress theme, so you both always have the most up-to-date versions of every file.

Conclusion

I love Dropbox. I use it primarily for backing up my client files and the occasional reversion to an older version of a file, but I also use it a lot for sharing files with people instantly (both for code files that other people are working on with me, and for sending over small files like images without resorting to emails or IMs).

What do you think of Dropbox? What uses have you put it to, or do you have a different tool we should look at?

Enjoy this post? You should follow me on Twitter!