Back Up and Restore Database
Top 


The reasons to make backups are covered earlier in the section Setting Up Your Campground Database, so it's assumed that you will be doing this on a regular (daily) basis. Your data is too valuable to lose, so don't skip this step! Making a backup is very simple. In fact, after the first backup is made, it can be done with 2 or 3 mouse clicks. In addition, the software will remind you to do a backup if you haven't done one recently (the default is 3 days).

A backup of the database is simply an extra copy of the database file, which can be used to restore all of your data either on the original computer or on another computer with the Campground Master software installed. The copy may be compressed to save space with the ZIP option (turned on by default). Normally backups are made to a floppy disk since any computer can read the disk, and they are small, cheap, and easy to use. If you have a more sophisticated computer setup, you might make backups to other kinds of removable storage or to another computer on the network. (We recommend using removable storage, since backing up to another computer does not allow for easy rotation of daily backups or for keeping a portable copy off-site.)


Backing Up

Before making your first backup, you need to decide where you're going to back up your files. Some advanced options were mentioned above, but for this discussion we will assume that you will back up to a floppy disk, which is normally your A: drive.

After inserting a floppy disk in the drive, just click on the "Safe" icon on the toolbar to start. You will see a "Save As" dialog, which is the standard Windows file dialog for saving files to a specific location. From there you need to do two things -- enter a file name and select a location for the file.

The first part will actually be done for you in most cases. You should see the name of your database in the File name field, possibly with a .zip extension instead of the normal .prk extension. If you don't see anything in the File name field, or if you prefer to name your backups differently (for instance you could use a different name for each day), then you can change that name. You should either leave the extension the same, or enter a name with no file extension (in which case it will use the default extension of .zip or .prk). Whatever name you use here, it will be remembered and used the next time you make a backup.

Now you need to select a location. If you have backed up before, the previous location is already selected for you. If this is the first time, you will need to select it from the Save In: drop-down list at the top of the dialog (called Look In: on some computers). Assuming you want to save it to the A: floppy disk drive, this may be as simple as clicking on the list to open it and clicking on the A: drive selection. If you don't see A:, click on My Computer to open up that folder, then click on the same drop-down list again to select A:. If you haven't inserted a disk in A: you will get an error message, in which case you can insert a disk now and retry.

Now that you have a file name and location selected, click the Save button on the dialog (or OK on some systems). If there's a previous backup on that drive, it will show a warning that there is already a file by that name on the disk, and ask if you want to replace it. Answer Yes to proceed with the backup.

While the file is being backed up, the cursor will change to an hourglass. You can't do any other functions while the file is being backed up. Initially it should only take a few seconds. As the database grows, it will take a little longer to back up. Once the backup is finished, a "Backup Complete" message will be shown.

That's it, you've created a backup! Now the next time you back up, it can be done in 2 or 3 clicks -- click on the Safe icon, click Save (since the location and file name will be recalled from the first time), and click Yes if it asks you to confirm replacing the file.


Backing up to a CD (CD-R/W) drive

In order to back up the database directly to a writable CD, you must have CD software installed which supports direct writing to the CD by applications. Adaptec's DirectCD or HP's DLA (drive letter access) programs are a couple examples. Other programs that only allow drag-and-drop operations, (except Windows XP's built-in CD recording support), may not work. We recommend using floppy disks for backup if possible. Otherwise, you may have to back up to the hard drive and manually move the file to the CD using separate CD-burning software.

If you're using Windows XP with a CD-RW drive, then you can select the CD-RW drive as the backup location in Campground Master. The file will actually be backed up to a holding area where XP will see that it's waiting to be recorded on the CD, and then XP will prompt you to record the file. Be sure to follow the prompt from XP, or else the file will not be recorded to the CD!

You may also need to disable the Compressed option (Maintenance / Program Files / Database) when backing up to a CD. If you get an error with compression on, try it without compression. Whether this is required depends on the specifics of the CD software. If you get an error even with compression disabled, then your CD driver software doesn't support direct writing to the CD.


Backup errors and handling large files

If you get an error message saying that the disk is full, you will need to start using the Compressed option so that it takes less space and so that multiple disks can be used if necessary. (Also make sure you are using disks that don't have any other files on them!) This is the default option, so you should never encounter a "disk full" message unless you change the compression option.

If the database grows too large to fit on one disk when you are using the Compressed option, you will be asked to "Insert disk 2 of the set" and so forth until the backup is complete. If you're using multiple disks, make sure you have each one labeled according to disk number (disk 1 of 2, disk 2 of 2, etc.) and that you have enough disks in rotation to make a set each day. For instance, you should have a "Monday 1 of 2", "Monday 2 of 2", "Tuesday 1 of 2", and so forth. Be sure to insert the correct disk of the set each time. When you need to restore the backup, you will be asked to insert the disks by number, so the order is important.

If you get an error that the disk is write-protected, try moving the little write-protect tab in the upper corner of the disk so that it covers the hole. If that doesn't work, it may be a defective disk or a defective disk drive. Try another disk, and if that doesn't work, consult a technician.

If you get other errors, like "error writing to A:", it may be caused by a defective disk. Try another one, and discard the one that had the error if another disk works. If each disk you try gets an error, then the drive could be malfunctioning.


Automatic Backups

As an added precaution, the program automatically makes a backup at the start of each day and places it in the same location (folder) as the database file. The automatic backups include the date in the filename, and are kept for 30 days by default. Older ones are automatically deleted, and the number of days they're kept will be the same as the number of days for log files (see Maintenance / Program Options / Database). However, since these backups are still vulnerable to computer malfunction (hard disk failures, viruses, etc), this is not a substitute for making manual backups! This is only an extra safeguard in case you don't make regular backups.

Note that if your disk drive does not have adequate space for an automatic backup, additional old backups will be deleted until there is room. (The 3 most recent days will never be deleted.) If there is still not enough room, it will give up and not create the backup - however no error message will be shown, since it's an automatic process, so try to keep plenty of space on your hard disk.

If you need to restore from one of the automatic backups, simply use the Restore function as described below, but navigate the Open dialog to your database folder. You will see a series of files with your database name plus "_Auto_Backup_" and the date. (They will be .zip files, so be sure you're looking for the .zip file type.) Select the latest one and restore from that file.


Restoring from a Backup

We all hope it never happens, but the day may come when your computer malfunctions or some other problem requires you to restore the database from the backup copy. Hopefully you had been making daily backups so you won't lose more than a day's work. (This is also a good reason to keep copies of printed receipts for at least a day or two, in case you need to re-enter reservations.) This function can also be used to load the database that was backed up from another computer. Actually, as long as you haven't disabled the logging function, it can also apply all changes made since the last backup automatically, so you shouldn't lose anything if the files are intact.

Restoring from a backup is just as easy as making a backup, but there are more steps and warnings because it's inherently a risky function. Even with a perfect backup, you are asking the software to load a database that may be older than the one it's currently using, so you need to be sure that it's necessary.

To start a Restore, select Restore from Backup on the Maintenance menu. Remember that you must have Administrator access to use this function. After one or more warnings (depending on whether the current database is saved and whether you've done a backup from this computer), you will see a File Open dialog.

If you have done backups from this computer, it will assume you want to restore the last backup made and will fill in the file name and location accordingly -- so all you would have to do is click the Open button. If this is a new computer and you have not made a backup on it before, then you will have to navigate to the location of the backup file (as in Backing Up above), and select the backup file name from the file list. This may be the A: drive (locate it with the "Look In:" drop-down list), or in some other location.

Once the File name field has the proper name in it, you can click Open. Now it will load the backup from the disk (asking for other disks in the backup set if necessary). Once that is done, you will be informed that the pre-restore database has been saved (to a file with the time and date in the name), in case you need to revert to that database.

Multi-disk Note: If your backup required more than one disk, you should insert the last disk of the set first (e.g. disk 2 of 2). Otherwise you may get an error message that the backup failed. Once you've inserted the last disk and started the restore, it will ask for each disk as needed.


Once the backup database is loaded, you may see a message indicating that there are changes in the logs that are not in the database -- this is normal, since you are restoring from a backup, and you should answer YES to the prompt so that the logged changes are restored also. (The only exception to this is if your actual purpose for restoring was to undo some drastic changes.) If all goes well, the database will be back to the way it was, with all changes intact.

Finally, a confirmation message will be shown.

If you are sure that the database you just loaded from the backup is the data you want, then you can continue as normal (you will need to log in again, since the restoration procedure automatically logs out the previous operator). If you're not sure yet, read the following section carefully.

IMPORTANT: The restore operation should be done while the original database file is opened (i.e. the current database name and location are the same as it was when it was last used normally), otherwise the program won't be able to check the log files for post-backup changes. It's also important that the database be saved to that same location after the restore is done. If the database cannot be opened from the original location for any reason, then the following procedure is recommended:

1. Open whatever database you can (even the sample database if necessary), and restore from a backup as above -- but then immediately do a File / Save a Copy As to save the database as the original name, and the original location. Be sure no changes are made before you do the Save -- don't even look around in the data, since that can cause changes to be logged.  
 
2. Close Campground Master, and re-open it. The database should be re-opened automatically (assuming you didn't use the Sample Database icon). Then you may see a message indicating that there are changes in the log -- answer YES to apply the missing changes. Now you should be fully restored.  


Aborting a Restore Operation

Assuming you have just completed the Restore and done nothing else, you still have a chance to change your mind and get the previous database back. This is because the pre-restore database is saved to a unique filename. So if the restored data is not what you want, you can still get back to the database you had before the restore using File / Open. Just locate the pre-restore file (it will contain " PRE-RESTORE " in the file name, along with the date and time), which will be in the same location as the database. However, that will become your new current database when you open it -- so then you need to use File / Save a Copy As to save the data back to your normal database name and location.


Page URL http://CampgroundMaster.com/snews/backupdatabase.html

Campground Master Home