Readers will recall the issues that I’d had some time ago in trying to force Windows Backup to play ball with an external hard drive encrypted by TrueCrypt. For some reason or another, Windows Backup refused to recognize the mounted drive as a valid backup location. One reader recommended that I try Acronis True Image out. Seeing as I like free stuff, I’ve found a free solution that solves the problem entirely.
Now it should be said from the outset that this process is a little bit ugly and a tad long winded, but that it does a really swell job and is full of opportunities to improve upon and to customize it for your particular situation.
Read on for the full tutorial – now with pretty pictures!
What You’ll Need:
- A Windows computer, prefferably running Vista (Windows is necessary, but this can be done on XP)
- A copy of Areca Backup (I grabbed the v6.1 stable release)
- The Java Runtime (Optionally, you might already have this; run the Areca installer and it will automatically direct you to the correct download if necessary)
- Some free space to put your backup, optionally encrypted and mounted with TrueCrypt for extra-lucky-fun-security-time.
- About a half hour of free time
Setting Up Areca:
Lets begin by opening up Areca. This utility will allow you to easily create scripted backup events to any location on your machine. We are going to use it to create a couple of these batch scripts and then use Windows Task Scheduler to automatically execute them on a daily basis.
We need to start by creating a workspace. Click the Workspace menu and select Open Workspace. Choose some folder that you aren’t going to delete where Areca can store it’s configuration files. I chose C:\Users\Jonathan\Documents\Areca\ for mine.
Now, you’ll see that group you just created has appeared in the right hand panel of the Areca main screen.
Right click on it and select New Target from the context menu. This brings up the Target Edition dialogue box, where we define where and how our backup should take place. Give the target a name, make sure that Local Repository is selected, and hit the Browse button.
The Local Repository is where you want your backups to be saved. Mine are being saved to an external hard drive that I’ve encrypted with TrueCrypt. Ideally, you want to put your backups on a different physical disk than the one that you work off of every day. This way, if your disk crashes, gets a virus, or gets otherwise corrupted, your backups should not be affected. You can choose a hard drive that you have installed in your machine, an external drive plugged in via USB or Firewire, or a network drive that is shared from another machine in your house.
Finally, ensure that the Storage Mode is set to Standard. At this point, your screen should look something like this:
Select Sources from the left side panel of the Target Edition dialogue box. This where you want to add all of the files and folders that you would like to backup.
When you hit the Add button, Another box pops up that gives you the option to add either a Directory or a File. If you want to backup an entire Folder, like for example C:\Users\Jonathan\Music, then choose Directory. If instead, you want to backup a specific file, like C:\Users\Jonathan\Documents\Secret Spaghetti Sauce Recipe.txt, then choose File. After selecting the file or folder that you want to backup, hit the Save button to add that file or folder to the backup set. Repeat for as many items as you would like to have backed up.
One note to make here is that these backup folders are recursive. This means that if you add the folder C:\Users\Jonathan\Documents to your backup set, all files and folders within that one are also automatically included in your backup. So, if you are a normal user who doesn’t have a lot of large files like video or music files lying around, adding the folder C:\Users\YourName\ (Vista) or C:\Documents and Settings\YourName\ (WinXP) to the backup set should ensure that all of your important files are backed up.
For reference, my backup set looks something like this:
As you can see, I have included a mix of folders and files. If you find yourself adding more than 10 files to the backup set, you should probably consider reorganizing your documents folder before continuing. The worst thing in the world is to restore your files from a backup set, only to realize that you forgot that one really important file.
Ok, just two more settings and we can get on to the fun stuff.
Select Compression from the left side panel of the Target Edition dialogue box. In this window, we just want make sure that the compression mode is set to Zip 64 and that the Add .zip Extension to Filenames box at the bottom is checked. This will make sure that if for whatever reason you want to restore your files without using Areca, you can do so with any zip utility, and that your zip files can grow to be more than 4GB in size (in case you have media in there). Finally, select Description from the side panel, and type in a description of this backup set. Mine just says “My Backup.” Alright, now you can hit the Save button.
At this point, if you would like to, you can repeat the above instructions to make another backup set for awesome customizability action. You could, for example, create one backup that runs just your normal small files daily, and another set that backs up your large music and video files just once a week. This can be a time and space saver in your backup location, while still making sure that the most recent copy of all your important files are backed up.
So we’ve created a workspace, a group, a backup set, and defined what files should be put in that backup set. This is where Areca ceases to be useful and we turn to Windows Task Scheduler to do our dirty work. We are going to use Areca to create two scripts that will perform full and differential backups respectively, and then use Windows Task Scheduler to schedule those scripts to run when we arent using the computer. This lets us automate the backup process so that we (almost) don’t have to worry about it until your hard drive chews on a brick.
Back in Areca, right-click on your backup set, and choose Wizards->Generate Backup Shortcut from the context menu. This dialogue lets you create the batch scripts that I just mentioned. Choose a location on your hard drive that you aren’t going to delete (I chose the same folder that I put my backup group in so that everything is in the same place), and call the first script backup_full.bat. Change the type to Full Backup, and make sure that the Scope is For the Selected Item Only. This will create a batch script that performs a full backup of your files – a copy of every byte of every file in your backup set.
Hit Save to get back to the main screen. Now, right-click on your backup set, and choose Wizards->Generate Backup Shortcut again to create the second script. Select the same folder as last time, but this time call the script backup_diff.bat, and change the type to Differential. Again, make sure that the Scope is set to Selected Item Only. This will create a batch script that performs a differential backup of your files by comparing their current state to that of the last full backup and only including new or changed files in the backup set.
Task Scheduling Action:
We are going to set up Windows Task Scheduler to run the full backup once a week, and the differential backup on the other six days of the week. This means that once a week, we will make a full copy of all of our files, and on each of the other six days of the week, we will copy only the files that have been added or changed since the last full copy. This allows us to keep the time spent on backups relatively short, while still providing the security of a good backup set. The instructions below deal with how to set up Task Scheduling on Windows Vista installations. For Windows XP instructions, see this Microsoft Knowledge Base article.
Task Scheduling for Vista:
Open up the Control Panel, click Classic View on the left side panel, and double-click on the Administrative Tools icon. In this folder, double-click on the Task Scheduler icon. This will bring up the Task Scheduler window. Open the Action menu and select Create Basic Task. In the window that appears, enter Full Backup for the name, and an optional description:
Click Next, choose Start a Program, and click Next again. Now browse for the backup_full.bat file that we created earlier. Leave the Arguments and Start In boxes blank. The form should look like this:
Hit Next and then Finish.
Now we want to (almost) repeat the above process to schedule our differential backup. Open the Action menu and select Create Basic Task. In the window that appears, enter Differential Backup for the name, and an optional description:
Click Next and choose Weekly, then click Next and set up your recursion options. This time, we’re scheduling our differential backup to run on every day that our full backup does not. So before, I set my full backup to run on Monday. Now, I want my differential backup to run on every other day of the week:
Click Next, choose Start a Program, and click Next again. Now browse for the backup_diff.bat file that we created earlier. Leave the Arguments and Start In boxes blank. The form should look like this:
Hit Next and then Finish.
Now, if you click on the Task Scheduler Library node underneath the Task Scheduler node on the left side panel, you will see the two tasks that you just created.
Congratulations! Your backup is scheduled and ready to run. If you would like to run it right away, go to the Areca folder where you saved the backup_full.bat file, and double click on it. A console window will pop up with a bunch of gross stuff inside of it. When it closes, the backup is finished.
We used Areca to create a backup set, along with two batch files:
- backup_full.bat creates an exact copy of all files in your backup set once a week. This will be a huge zip file because it contains everything.
- backup_diff.bat creates a copy of any files that have been created or modified since the last time backup_full.bat was run. This happens on every day of the week that backup_full.bat does not run, resulting in incremental backups created throughout the week.
Won’t This Create an Awful lot of Big Files?
In a word, yes. Neither of these scripts will ever clean up their messes – so you’ll eventually have backups years old in your backup folder. This is no big deal if you’re backing up Word documents or your family photo albums, but if you’re backup up music or video files, you may fill up your destination drive within a matter of weeks.
If this is the case, you should either manually delete old backups once in awhile, or use this handy tool that deletes zip files that were created more than three weeks ago in your backup directory (Requires Microsoft .NET Framework Runtime):
Download: Backup Directory Cleanup Tool
Compiled Executable: [BackupDirectoryCleanup.exe] (28K)
Source Code: [BackupDirectoryCleanupSource.zip] (46K)
I suggest using Tyler Burton’s Hash Verifier tool to ensure the integrity of this download.
To add this application to our tasks, download it to a location where it won’t be deleted and open up the Control Panel. Click Classic View on the left side panel, and double-click on the Administrative Tools icon. In this folder, double-click on the Task Scheduler icon. This will bring up the Task Scheduler window. Open the Action menu and select Create Basic Task. In the window that appears, enter Directory Cleanup for the name, and an optional description. Click Next and choose Monthly, then click Next and set up your recursion options like this (Where the start date is today’s date):
As you can see, I chose to run the application every three months on the first day of the month. That should be sufficient to prevent too much clutter on your backup drive, but you can run it more often if you like. Click Next, choose Start a Program, and click Next again. Now browse for the BackupDirectoryCleanup.exe file that we downloaded earlier. In the Arguments text box, enter -p path where path is the full path to your backup folder. In my case, it is E:\ because I’m backing up to an external drive:
Click Next and then Finish. Note that this application may encounter some serious problems with permissions. It does request information about your file system, and has the capacity to delete files. If windows moans, either figure out how to launch it as an administrator (that’s in the advanced settings for a task), or clean out your directory manually, because this article is already way too long to discuss permissions as well.
Backing up your files is something that we should all take just a little more seriously. In my setup, where all of my computers are protected with full disk encryption from TrueCrypt, having an unencrypted backup lying around somewhere pokes a big hole in my security policy.
While this solution may be a little messy and requires you to fool with batch files and control panel items, it is fairly straightforward and results in a simple, robust, and reliable backup system that is secure and easy to set up and maintain. I hope that this article helped you solve your backup issues. May your hard drive not suck a lemon,
Edit: Fixed a couple links, corrected some grammar, and cursed WordPress for failing to format my stuff properly.