Automatic backups of my windows laptop

Backups are important. This tenet will be learned the first time you lose important files. Knowledge in itself is useless, it’s the application knowledge that reaps rewards.

Having learnt many years ago the cost of losing data from a computer, I’ve become a dab hand at setting up backup routines for my laptop, desktops and servers. In the past I used a windows shell script to copy files from my laptop to a space on my office server. That server backs up again to an off site server just to make sure the data is kept. Unfortunately this script has been somewhat unreliable of late. At some point, on a never quite identified file, the copy action would fail and backup would stop. I needed a new solution, one that would be reliable, simple to set up and cost nothing but setup time. I found it in the shape of some linux software called rsync and a windows client to rsync called DeltaCopy. Actually, DeltaCopy is more than just an rsync client, it can be an rsync server for windows machines but I didn’t need that. That would be very useful though if you are using an old windows PC as your file server though.

What’s rsync?
From their web site: rsync is an open source utility that provides fast incremental file transfer. rsync is freely available under the GNU General Public License.

I’ve known of rsync for years, but never used it until now. Essentially the programme will compare files in two directories, if a file has been updated it will copy the updated parts and not the whole file. My script solution copied everything whether or not it needed to be. As I’m on the same network as my backup server bandwidth really isn’t a problem. However, the rsync solution means I will be able to succesfully backup from home over the VPN.

Setup was really easy.
First set up our linux server to run rsync as a daemon. That means it runs all the time waiting for other rsync programs to connect to it. That’s the same way a web server like apache works, sits there waiting until it has something to do, does it, then waits again. How to do that will depend on your server software but for my Trustix powered server it was simply “swup –install rysnc-server” and it was downloaded and installed automatically. Trustix has reached end of life now, so if you are looking for a new operating system you’ll find rsync on most ready to go, including redhat and ubuntu.
Second set up my laptop to use an rsync client. That includes choosing which folders I want to synchronise with the server
Third, enable the rsync client to run as a scheduled task on my laptop.

This is where the DeltaCopy program is so useful. It’s a windows point and click graphical interface. Installation was a breeze and I confess I didn’t read the instructions to see how it worked it was so simple. You create a “profile” for each synchronisation task you want. For me there’s only one, I called it “laptop backup”. Then add all the folders (or specific files) you want backed up followed by the server details. At the bottom of the profile is a section called “schedule”. DeltaCopy links seamlessly to the windows scheduler, so I set my backup to occur every day at 11am. Later I found settings that let me get an email on whether the backup worked and how well it went. If it works, the email includes the rsync result information too.

Today the first success email arrived at 11.07. In 7 minutes the folders had been synchronised and my backup completed. It’s so fast because only changed files have been copied across the network. The full backup is a huge 21Gb…. perhaps that explains why the script would fail, 21Gb over a wireless network would take…. a long time.

The final step of any backup: Test it worked and test regularly. Testing is easy using this method, just open the file from the server over the network. To think of all those hours I used to spend waiting for a file to be recovered from my TR1 tape backups.