Database backups

by ChessBase
6/2/2009 – Hard drives crash, data gets corrupted -- what to do? The answer is to back up your data before problems start. Steve Lopez describes two different ways to back up your databases in his latest column. Learn some proactive measures to save your data in the newest ChessBase Workshop.

ChessBase 17 - Mega package - Edition 2024 ChessBase 17 - Mega package - Edition 2024

It is the program of choice for anyone who loves the game and wants to know more about it. Start your personal success story with ChessBase and enjoy the game even more.

More...

In the last ChessBase Workshop column we talked about database "screwups" -- losing your data somewhere in a folder unknown or even acidentally deleting a database. This time around we're going to talk about something proactive you can do before problems occur: backing up your databases.

I've been pretty lucky myself. I've used computers on a daily basis since 1992 and only recently suffered my first hard drive crash; it totally wiped out everything on my old laptop's hard disk. So, believe me, it happens. There are loads of other ways you can lose data: power outages, power surges, and just plain old data corruption -- being as data storage is a magnetic medium, sometimes ye ol' bits and bytes get misaligned and a file become unreadable. The best thing you can do is have a backup copy of your data available.

Data backup is cheaper and easier now than its ever been. Having learned my lesson from my hard drive crash, I now have a 500 GB external hard drive as a backup. If my new laptop crashes, I can just plug the external drive into another computer and keep on going. Check around for prices -- I got out for under $150, and you can do still better if you're willing to take the time to comparison shop.

The little "clip" flash drives have recently dropped in price as well; I bought a 4 GB flash drive for under $15 a couple of weeks ago. Two months ago the price was the same for a smaller 2 GB drive, while two years ago a 1 GB flash "clip" sold for higher than $15.

The point is that burning a big stack of DVDs is not only time-consuming but a pain in the glutes too. Copying to a flash drive takes just moments and you can freely overwrite the data as you go if you're working with a database to which you're making constant changes. If you're working on something like a book, though, I recommend separate daily backups instead of performing repeated file overwriting. When I was writing my CD about Fritz and other chessplaying programs several years ago, I kept daily backups in separate dated folders so that I could return to any individual day's work if need be.

So how do you make a backup of a database? One way is to simply copy the files. As we saw in last week's ChessBase Workshop, right-clicking on a database icon in ChessBase 10 reveals a popup menu. Selecting the "Properties" command brings up the following dialogue:

Pay particular attention here to the top box in the dialogue -- that's the database's location. You see the drive letter and folder "path" to the database shown in this box. I'm going to make a big leap of faith here: that you know how to copy files and folders in Windows. If you don't, learn -- there are books available for purchase as well as online tutorials on the subject. All I'm going to discuss here are ChessBase-specific issues relating to backing up/archving your databases, which is plenty to tackle without providing a Windows tutorial too (many of which are better than anything I'd rapidly blow through in this column anyway).

For the sake of an example, let's say that you've created a database of your own games and named it mybase.cbh; obviously, you'd like to make a backup of it so that you don't have to enter the data all over again later in case of a problem. Launch ChessBase 10, right-click on MyBase's database icon, select "Properties", and then make a note of the path to the database as displayed in the upper box of the Properties dialogue.

Exit ChessBase and fire up your choice of programs for handling files and folders. The most commonly-used programs are My Computer and Windows Explorer, but some people prefer to use other third-party utilities. Regardless, when you open the folder that MyBase resides in, you're in for a surprise: you'll see many files which are called "mybase" but which have different file extensions after the "dot" in the filename. The exact number of these files will depend on various factors: whether you have index "keys" attached to a database, whether or not the database has a "search booster" file attached to it, etc. But a database will always consist of multiple files.

That's a crucial bit of info. When copying a database from one place to another you need to copy all of its files. I can't stress that highly enough, and I'm sorry to say that it's sometimes overlooked by users. I've talked to more than one person who copied just the .cbh file, deleted the others, and later discovered to his horror that the database was unreadable.

So I'll say it again and I'll do it in a separate paragraph for emphasis:

When copying a database from one place to another you need to copy all of its files.


ChessBase has a built-in utility which will archive a database for you. The utility with gather up all of a database's multiple files, bundle them into a single file, and even compress them so they'll take up less storage space on your drive.

How do we activate this feature? There are a few ways to do it; here's one of them. Single-click on a database's icon to highlight it. Go to the Tools menu, select "Database", and then select "Backup database". You'll see the following dialogue appear:

You have one decision here: whether or not to password-encrypt the archive file. Password encryption means that no one but you can open the archive file and extract the database files. I do mean "no one" -- if you forget the password, don't ask the ChessBase programmers to help you out because even they can't crack the encryption.

Now I already know (either through my metahuman precognitive ability, or probably just the fact that I've written a weekly column for more than a decade and have been down this weary old road before) that some wise guy is going to write to tell me that no encryption is uncrackable. And he'd be right. I'm sure some master hacker or NSA guy could help you get back into your database, and I wish you luck with that.

Instead of squabbling about this, let's do things the easy way. Unless you're a super-GM who needs to protect your "home analysis" there's really no reason for you to encrypt a database archive file. It's that simple. Don't mess around with encrypting the file unless there's some really, really good reason for protecting your database from the prying eyes of others. And if you do choose to encrypt it, don't lose your password unless your next-door neighbor is a NSA cryptographer who's inclined to help you crack the file later.

After selecting "Uncrypted" and clicking "OK", you'll see the following:

This allows you to select a folder in which to store the archive file; the default choice is the folder in which the database currently resides. You can see that I've already created one here -- if I create another, it will overwrite the existing .cbv archive file.

It's generally a good idea to create the .cbv archive in a different folder from the database files, probably on another drive (see the advice above about flash drives and external hard drives). If your original database is on your computer's internal drive, you put the archive file in the same folder, and then the hard drive crashes, the archive file didn't do you a whole lot of good, did it?

Another reason for creating the archive file in another folder is purely technical. To uncompress a database archive file in ChessBase 10, you go to the File menu, select "Open", and then select "Open Database" from the submenu. You navigate to the proper folder and select the .cbv file -- if it's in the same folder as the original database, you'll see this:

"OK" will overwrite the existing files, while "Cancel" will bail completely out of the process. There's no other option which lets you select a different folder into which to uncompress the files. So save yourself a step and create the .cbv file in a different folder in the first place -- that way you won't accidentally overwrite your database files.

We've seen two ways to backup your database files -- by manually copying files to another folder and by creating a single "bundled" archive file. Both work wonderfully well but there's a point which needs to be stressed here: if you're backing up data to preserve it in the event of a computer problem, you need to copy it to a different physical location, be it a CD, DVD, flash drive, external hard drive, a separate computer on the same network, etc. It sounds elementary but I've talked with quite a few people who missed that important step somewhere along the way.

Until next week, have fun!


© 2008, Steven A. Lopez. All rights reserved.

Reports about chess: tournaments, championships, portraits, interviews, World Championships, product launches and more.

Discuss

Rules for reader comments

 
 

Not registered yet? Register