How to Backup Your Files to CD-ROM

by Rob Locher


There does not seem to be much software on the market to backup files to CDROM (CD-R or CD-RW).  While I have not tried the existing commercial software, I am suspicious of the method generally used; I suppose that it wastes time and CD-Rs.  This article tells you how to make your own backup procedure instead.  It assumes that you are fairly clever with computers, and don't mind the idea of creating a simple batch file or two.  It also assumes that you have the software to "burn" a CD-ROM, and the software to create a compressed archive, such as a Zip file.  Although I will marginally refer to the Windows way of doing things in this example, the general principles are applicable to any operating system commonly used for a computer in a home or small office.


A Short History

First, let me tell a short history.  I used to own a tape backup drive made by a popular manufacturer of portable storage drives and media, who shall remain nameless.  I thought that the tape drive was a great solution, back in the day when a 2 gigabyte drive was a large hard drive.  Unfortunately when I upgraded to a newer motherboard, the tape drive refused to work with it.  So I was forced to find a different solution.  About a year later, I bought a CD-ROM burner.  Dirt-cheap media, ubiquitous, supported by many manufacturers: I thought I had found the perfect solution to the problem.

However, back in the year 2000 or so, after an exhaustive search on the web I found that there was only one software package that did backups to CDROM: Easy CD Creator®.  (Easy CD Creator is a trademark of Roxio, Inc.)  Unfortunately Easy CD Creator® version 4 had acquired a terrible reputation as being horribly buggy for about every other user, to the point where many people were forced to reinstall Windows after having attempted to install Easy CD Creator®.  The current version as of this writing, version 5, still has the same awful reputation according to user reviews on Amazon.com.

As a bit of background for this article, I did another web search to see if there was any new backup software that specifically advertised the ability to back up to CD-ROM.  I was glad to see that there are a few now where there were none before.  Unfortunately, I don't know anything about any of the other software packages or the companies that make them.  If you have experience with any of these products, please share it with me via email if you have the time.


The Problem

The problem faced by the developers of any backup software is, what files should be backed up?  Most files on your hard drive are put there by an installer program as part of an application; only a fraction are data files, and only a fraction of those are unique and meaningful files that you must save.  So, most commercial backup applications intended for home or small office users urge you to back up all the files, or offer the ability to pick and choose files and folders as an option.  Of course, if you back up all the files, nowadays you're looking at burning something like fifteen CD-ROMs!  Most backup software mitigates this impact by saving only changed files on subsequent updates of the backup.  This strategy ends up costing space too though, because each time you update the backup, the index that stores the information about "what version of what file is on what disk in what revision of the archive" must be updated; eventually that index can become rather huge.

Now CD-Rs are pretty cheap, but I don't want to sit around burning 5 CDs every time I do a backup.  (I try to back up my files every week or two.)  If you are a power user, you don't either.  So you are going to have to pick and choose which files to back up.  In my opinion, you shouldn't waste your time backing up files that were put there by an install program.  Sure, if one sector of your hard drive bites the dust and takes a file or two with it, the more files you save the more likely you will be able to restore the missing file.  However, if your install program uses the Windows Installer, as more and more do these days, you might be able to just put the original CDROM back in the drive and tell the install program to repair the installation.  (What an improvement!)  But my point is that I would rather tailor my backups differently.  I would rather have them suited to replacing my critical data files on a fresh installation of the OS and the applications.  I reason that in the case of disaster recovery, I would rather at least get a clean system even if it costs me a day or two rather than reinstall the same crud clogging the hard drive and the registry left over from two years.  (Aside: those of you not using Windows might turn your noses up and say "at least my OS doesn't require me to reinstall it periodically to keep the computer running smoothly."  Well, if you said that, let me tell you that Windows installation programs have come a long way, especially those using the Windows Installer.  I've used plenty of operating systems, and I know that useless old files take up more and more of the hard disk over time no matter what OS you use.)  Also, the only time I have ever used my backups so far (knock on wood) has been for planned reinstallations.


The Procedure

  1. Pick the files to be backed up.  This sounds rather daunting, but it doesn't have to be.  This step is so important I'm going to break it down further:

    1. Identify which applications you use to create your critical data.  My list starts with my email client, my programming tools, and my office applications (spreadsheet, word processor, etc.), and so on.  It finishes with computer games for which I want to save the high scores.  (Really!)
    2. Figure out where each application keeps its data. This is the most difficult part of the procedure. For some applications, such as a word processor, it is wherever you chose to put the files.  Older such programs usually suggest that you put your files in a subdirectory with the program files (which I have always thought was an extremely short-sighted decision, having used various versions of Unix).  Newer such programs usually suggest that you put your files in My Documents.  ("My Documents" is actually an alias for another directory buried somewhere else on your hard drive.  If you are using a batch file, you will need to find out what the real directory is.  See Windows Help.  "My Documents" is an improvement over putting the files anywhere, but not much of one if you ask me.  The name "My Documents" is so sappy, and I have yet to see a program that encourages organization inside "My Documents".)

      By the way, if you don't do so already, I would urge you to put your data files that you have control over into a clear hierarchy of folders, preferably segregating files to be backed up from files that you don't want to be backed up.

      For applications that you have no control over where files are stored, such as your email client, you may have to do some detective work.  I have found that the web site for the program almost always has the answer somewhere.  If not, ask Technical Support.   When they get tired of being asked, they will put it on the web site.  If all else fails, do some detective work and look around the hard drive for the files.

      I would recommend that if you have lots of pictures, movies, sound files (MP3s), or downloaded programs, you should burn those separately onto CD-ROMs rather than save them in your scheduled backup.
    3. Make a list.  Write down in a single list the location of all the folders containing the critical data for every application you identified above.
  2. Figure out how to use an archive program that takes command-line arguments.  If you are a Windows user, and you have WinZip®, there is also a utility that you can download free that provides a command-line interface.  (WinZip® is a registered trademark of WinZip Computing, Inc.)  In the example batch file that follows, wzzip.exe is the command-line version of WinZip®.
  3. Create a batch file to create your backup archive.  Hopefully you will be able to create a single archive that fits on one CD-ROM; otherwise you will want to create more than one archive, or span your archive across multiple disks.

    Once you have the list of folders, if you know a little about making batch files, this part is easy.   Here is a part of mine:

    wzzip -r -P C:\backup\archive.zip "C:\Some Folder\*.*"
    wzzip -r -P C:\backup\archive.zip "C:\Another Folder\*.*"

    I highly recommend the command-line option for your archive program that stores the complete filename for each file in the archive, rather than just a relative filename.  If your archive utility can protect the archive with a password, I recommend you do so.  (For wzzip, see the documentation for the -s option.)  Don't forget the password!

    Warning: do not put your archive in a folder that will be archived!  You might end up with an archive that consumes your entire hard disk...
  4. Create a batch file to unpack your archive, and instructions.  While you could always figure out how to get the archive unpacked later, you might as well simplify the chore of unpacking the archive now, so that in case of a disaster your headache will be smaller.

    I recommend that you have a folder that will be copied to your backup CDROM.  In this folder I recommend you put: the batch file you used to create your archive (for reference), the batch file to unpack the archive, the installer program for your archive utility, and the instructions.

    The instructions should be in a simple format, such as a text file.  If you need an installation key to activate your shareware archive utility, the instructions are a good place for it.  By the way, I recommend that your unpacking instructions say to unpack the archive before you install most of your applications; that way, applications that expect their data to be in certain places will usually automatically recognize their archived data upon installation.

    It also is a good idea to list the versions of the major applications that you are saving data for, in case you have to recover data from an old archive in the future.
  5. Save your files.  Of course after having created the procedure, you will want to do your first backup.  My email client and my web browser are integrated, and so to save my emails I need to save all the data for my web browser too.  This means that my backup procedure tries to save my browser cache, which is allowed to grow as large as 100 Mb, so I try to remember to clear the cache before I do the backup.  No matter what email client you use, your backup will probably be smaller if you empty your email "trash" folder before you start.

    I recommend you configure your "burning" utility to verify the files after they are written.
  6. Take your backup off-site.  If you back up the files on your home computer but leave the CD-ROM at home, you will not be protected if your house burns down.  I just chuck the disk in my briefcase, and put it in my locked drawer at work.

End

As you can see, this procedure requires some ingenuity and experimentation on your part.  Assuming you know what you are doing, your effort will be rewarded with an easy way to back up your files regularly, and a simple procedure for retrieving your files that is equally suited to transferring your data to another computer or recovering from a disaster.

If you have any general questions, I'll be happy to answer them, but I'm not going to be too keen on helping you debug your batch file.  I hope this procedure helps you as much as it has helped me!


Postscript

Here is the batch file that I use, changed slightly, that shows how to password-protect your archived files without putting the password in the batch file.  The batch file takes one mandatory argument, which specifies the password to be used.


@echo off
rem C:\rbackup.bat -- by Rob Locher

if "" == "%1" goto notdef

if exist C:\backup\archive.zip del C:\backup\archive.zip

"C:\Program Files\Winzip\wzzip" -r -P -s%1 C:\backup\archive.zip C:\backup\rbackup.bat
if %errorlevel% GTR 0 goto error

"C:\Program Files\Winzip\wzzip" -r -P -s%1 C:\backup\archive.zip C:\some_folder\*.*
if %errorlevel% GTR 0 goto error

"C:\Program Files\Winzip\wzzip" -r -P -s%1 C:\backup\archive.zip "C:\some other folder\*.*"
if %errorlevel% GTR 0 goto error

echo Batch file completed successfully.
goto end

:notdef
echo Usage: %0 password
goto end

:error
echo Error encountered -- halting batch file

:end