ELECTRONIC T-NOTES


CHESSBASE USA'S WEEKLY ON-LINE NEWSLETTER


FOR THE WEEK OF JANUARY 3, 1999


BACK IT UP!

by Steve Lopez

Oh, boy -- there's nothing in life quite like double-clicking on a database icon and seeing a game list full of nothing but "Data error" entries. Well, OK -- maybe waking up to find a "Dear John" note from your significant other and then going outside to find all four of your tires flat. But that's about it.

The sad part is that once a database is destroyed in this manner, there's no way to recover it. There's not some secret feature of ChessBase or Fritz that will restore corrupted data. When it's gone, it's just plain gone.

It's not a question of if it will happen, either -- it's a matter of when. The week before Christmas I ran Scandisk on my harddrive and it destroyed four of my databases that had somehow crosslinked files with other applications. Three of the databases we easily recoverable. One of them was a personal database into which I had just spent two days entering analysis taken from a 1970's chess book. Two days' work -- gone, just like that.

So what can one do to prevent data loss? Unfortunately, there's nothing you can do to prevent it, but you can minimize the damage by making frequent backups of your databases. I can already hear you groaning: "Backups? Awww, man..." Telling most computer users to make backups is like telling a kid to eat his vegetables. "But they're good for you!" I would say in both cases. Or, to flog a tired cliche`: "An ounce of prevention is worth a pound of cure".

ChessBase7 and Fritz5 make it easy to backup a database (as long as the database is in .CBH format; the procedure won't work on .CBF or .PGN databases). In ChessBase, go to the Database window and click once on the database in question (highlighting it with a black outline). The go to the Technical menu and select "Archive database".

The first thing you'll see is a box asking if you want to save the database as "Crypted" or "Uncrypted". Basically, you do not need to select "Crypted" unless you're a professional player with some secret analysis stored in your database. This feature allows you to encode the database so that no one can open it and get to the contents without a password. Upon selecting "Crypted", you're prompted to type in a password (twice!). Do not, I repeat, DO NOT forget your password. If you forget it, there is no way that you can get back into your database unless you are some kind of master hacker. I've already had a phone call from a pro player who forgot his password and wanted me to help him get to his analysis. Sorry -- no can do. There's no secret hack posssessed by ChessBase insiders that lets us bypass the password. If you forget your password, you're sunk.

So your best bet consequently is to select "Uncrypted" if it's just a database of games you've collected (as will be the case for most of us). After you select "Uncrypted", you'll see the standard Windows file selector which will allow you to save the archive file in any folder on any drive. I recommend two things here:

1) Do not save the archive into the same folder as the original database (for reasons I will explain shortly);

2) Do not try archiving a database directly to a floppy disk. I'm absolutely phobic about saving data directly to a floppy disk without saving it on a hard drive first. I've lost so much stuff over the years by trying that shortcut. It often fails -- just a quirk of computers.

So select a folder other than the one in which the original database resides. I created a folder on my hard drive imaginatively called "Archives". Type in a name for the file in the "File name" blank. It defaults to the name of the original database with the suffix .CBV. A .CBV file is an archived ChessBase database. Click "Save" and you'll see a progress bar go whizzing across the screen. When it hits 100%, a new box appears saying "Result=" followed by a percentage. This is the percent reduction in the size of the database files. When they're archived, ChessBase compresses them to make storage easier. "Result=57%" means that the archive is 57% of the size of the original database.

So why go through all of this? Isn't it just easier to copy the .CBH file to a floppy? NO! NO!! NO!! NO!! NO!! NO!! NO!! And furthermore: NO!!!!!!

A .CBH file is NOT an entire database. A ChessBase database consists of at least six and up to twenty files (depending on how many key files you have for it), ALL OF WHICH ARE NECESSARY FOR CHESSBASE TO READ THE DATA!!!! If you get NOTHING else from this article, remember this point: a .CBH file by itself can NOT be opened by ChessBase or Fritz!!!

Using the Archive feature rounds up all of the various database files and compresses them into a single .CBV file for easy storage.

To archive a database in Fritz, load that database and click on the "Archive" button. Fritz gives you a file selector window that lets you store the .CBV file in any folder. Other than the fact that Fritz doesn't give you the choice of "Crypted" or "Uncrypted" archive files, the same advice given for ChessBase applies to Fritz.

After you've created an archive file it's a simple matter to copy it to a floppy disk. If the file is too big to fit on a single floppy, use WinZip or a similar compression program to archive the file across multiple floppies (WinZip uses a function called "multiple disk spanning" to accomplish this; consult the documentation for your compression program for specific details).

This brings us to the big topic: what do you do when your original database gets corrupted? It's pretty simple: copy the .CBV file into the same folder as your corrupted database. In ChessBase, go to the Database menu and click "Open"; then go to the folder with the .CBV file, select it and click "Open". The .CBV file will expand into the multiple database files from which it was created, overwriting the same-named ones currently in the folder. The .CBV file is then automatically deleted. In Fritz, you just click the "Open" button in the Database screen, go to the folder with the .CBV file, select it and click "Open". The same thing happens as outlined above for ChessBase. The corrupted database is overwritten, to be replaced by the backed-up version.

Note that you can't select a .CBV file in one folder and have it expanded into another folder. It always expands into the same folder as the .CBV file. This is why you don't create a .CBV file in the same folder as the original database: if you select it by accident, it overwrites the database. If you archived a database in November, added a bunch of games and analysis to the database in December, and accidently select the .CBV file in January, you wind up right back where you were in November -- all of your December work is gone. So exercise a bit of caution when uncompressing an archived database.

Also remember that once you uncompress an archived database, it's deleted. So don't go trying to uncompress it on a floppy or on a Zip drive or some other form of tape backup. Do it on your hard drive.

How often should you archive a database? There's no such thing as "too often". I archive my correspondence games and analysis every couple of days. I try to archive my opening databases at least weekly (but once a month would be closer to the truth). Basically, the more often you add to or alter the contents of a database, the more often you should back up your data.

Hopefully this week's ETN can help you avoid a tragedy like I had last month. Make those backups to be safe! Until next week, have fun!

You can e-mail me with your comments, suggestions, and analysis for Electronic T-Notes. If you love gambits, stop by the Chess Kamikaze Home Page and the Yahoo Chess Kamikazes Club.