Dropbox: Best backup program ever

Friday, Mar 27, 2009 9:30 pm
William Barnes
drop-box-icon

I love Dropbox (referral link*). I’ve been using it since September to back up my school notes and yesterday I suddenly noticed how much easier it has made things.

Dropbox is a program that runs in the background on your computer and monitors a folder (e.g., “Documents\My Dropbox”). Everytime you make a change to a file in that folder it immediately backs it up over the Internet. The free account gives you 2GB of space. There are paid accounts that give you more, but 2GB is plenty for my purposes. So you get the peace of mind that even if your laptop gets stolen on the way home from school, or if the hard drive suddenly dies, you have a backup already. It even keeps copies of old versions of all your files so if you accidentally break or delete a file, you can recover an older version from minutes or months earlier.

Even better, though, is that you can run it on multiple computers at the same time. I like my laptop most of the time. But my home computer has a much larger screen and a better keyboard. Before Dropbox, I used to do everything bent over my laptop even when I was at home. It was just too much trouble to copy files back and forth or to try to work on an essay at school and realize that the latest version is on my computer at home. Dropbox fixed that. Now when I press save at school, within seconds the file is updated on my computer at home. And within a few seconds of starting my laptop, any changes I made on my home computer are synchronized to the laptop. This is what hit me yesterday. I sat down at my computer to continue working on an essay I had been working on at school half an hour earlier and realized how I just take it for granted that whatever computer I sit down at has all my notes and essays already there. No network transfers, emailing, or USB keys. It’s so great.

Anyway, I cannot recommend this enough. Even if you only have one computer, the instant backup is still worthwhile. And it’s free anyway, so there’s no harm. Runs on Windows, Mac, and Linux so you can even synchronize the files if you own both a Mac and a PC.

In the interests of journalistic integrity or something, I should also mention Syncplicity. It does more or less the same thing but does not support Linux and the free trial limits you to two computers (I have Dropbox installed in three operating systems including Linux on each of two computers, Syncplicity won’t let me do that for free). Choose Dropbox instead.

* You get extra space if you refer somebody, if you don’t want to use the referral link go to http://www.getdropbox.com.

Backing up Gmail on an Ubuntu mailserver

Wednesday, Dec 31, 2008 12:47 pm
William Barnes

Backstory

I used to run my own Courier/Postfix mailserver to manage my family’s email (technically, I still do, but more later). Of late, I’ve been finding this to be a little bit of a hassle. Mostly because my laptop battery occasionally dies and I want to check my email from a public computer. This is a less than optimal situation. I have to run a webmail program on the server (RoundCube is nice though) and I have to type my server login into a strange computer. So I decided to switch to Gmail and it is wonderful. I like the interface, I can use a different password for it than for my home network, and somebody else does the work of keeping it running.

But I’m not too thrilled about all my email “living in the cloud.” I trust Google. I have no choice. If I’m going to give personal information to anyone, it would probably be to Google (since they probably already know more about me than I do). But there is always the chance that they will turn off POP/IMAP access to my email and it will be trapped there. Multiple simultaneous meteor strikes could destroy the data centres where my email is housed. If that happens, I’ll be unable to find all my LOLcat emails. That just wouldn’t do.

Solution

Enable POP on Gmail, download the email with Fetchmail, archive it to Amazon S3 once a month.

POP on Gmail

Gmail POP

In Gmail: open Settings; choose the “Forwarding and POP/IMAP” tab; choose one of the “Enable POP” options.

Download with Fetchmail

You’ll need to have a mailserver running on your computer. I suggest Postfix. You’ll probably also want to get access to your mail. If you’re installing this on your desktop, then most clients will be able to access your Maildir directly. If you’re installing this on a server, I suggest Courier. Both of these are available through apt. I would suggest reading a more detailed tutorial (see esp. pg. 5-6) if you have never done this before.

You will of course need fetchmail (sudo apt-get install fetchmail). You need a config file (sudo touch /etc/fetchmailrc & chmod 600 /etc/fetchmailrc) with your email addresses and passwords like so:

set daemon 3600

poll pop.gmail.com port 995 with protocol pop3
        user {gmailuser}@gmail.com with password {gmailpassword} is {localuser} here options ssl

Replace {gmailuser} with your Gmail username, {gmailpassword} with your Gmail password, and {localuser} with your username on your Linux box. Run sudo /etc/fetchmail restart and your email should be getting downloaded to your computer.

Archiving

You might be fine stopping there. You now have a local copy of all your mail. On the other hand, maybe you want more. It would be nice to have the mail sorted into folders automatically and it would be nice to have a second copy. I have a cron.monthly script that automatically sorts my Inbox into folders by month and year and copies the archived mail to Amazon S3.

The cleanup-maildir python script can be found here (check the comments for a bug fix). Copy that to somewhere in your $PATH (try /usr/local/bin). My archive script can be found here (or Bzip2 compressed). Copy it to someplace like /usr/local/bin and create an executable file in /etc/cron.monthly which contains a line like: maildir-backup /mnt/backup/Mail/username username. The first parameter is the backup destination and the second one is the local user to back up.

You can use the command-line version of JungleDisk to mount your Amazon S3 space and set that as your backup destination.

Hopefully this helps somebody someday. If nothing else, now I’ll remember what I did for when I upgrade my server next.