Keystone Database Backup

From GivenHansco Keystone Help
Jump to navigation Jump to search

Keystone includes a backup program on the System Maintenance menu and a command line utility for making backups of the Keystone database files. It is this backup file (.BAK) that you will need to restore from in the event of a catastrophic event. With a proper and accessible backup, your company can be restored or up and running on another server with a minimum of downtime. Backup strategies are discussed below.

WARNING: InterBase database files (*.IB) cannot be copied while 
there is an open connection to the database! 
The only safe way to copy these files is to back them up first, 
then copy the resulting backup files.
Attempting to copy open database (*.IB) files can result in 
database lockup (deadlock) and possible data corruption. 

Givenhansco support personnel can assist with configuring and/or reviewing a Keystone backup plan for your company.

Using Hard Disk Backup

The Hard Disk option creates and copies a backup (.BAK) file to the PC that the backup is ran on. This is also the process that takes place with system initiated backups before certain critical processes (e.g. Print Invoices) This process is useful in that, if ran on a workstation, it creates a backup file on a different PC than the server. While this backup is readily accessible and can often be useful, it should not be used as the only backup because the backup remains on site.

  1. Run Backup from the System Maintenance menu
  2. Select Hard Disk as the backup type
  3. If there is more than one Keystone company, login to each company and repeat backup steps


Using Backup to File

When selecting Backup from the System Maintenance menu, the File option allows the user to specify the destination of the backup (.BAK) file. A simple but effective backup plan can be created utilizing Backup to File and 2 or more USB removable flash drives or removable hard drives.

  1. Run Backup from the System Maintenance menu
  2. Select File as the backup type
  3. Browse for the USB drive as the backup destination and create backup
  4. If there is more than one Keystone company, login to each company and repeat backup steps
  5. Verify backup file(s) has(have) been saved
  6. Take the removable drive off site

Repeat this process each day, alternating removable drives so that there is always at least 1 backup on site and one backup off site at any given time.

Automated Backups

As of version 2.1, Keystone includes a utility program which will backup all company databases to a specified path. This is used in the configuration of automated backups of the Keystone databases. GivenHansco support can help you configure this option.

  • Important: If you are utilizing any automated backup strategy, you must have a procedure in place to verify daily that the backups have completed.

The program CCUTBKDB.EXE is located in the Keystone BIN directory, and can be included in a Windows batch file for use by an automated backup program. Here is the syntax:

CCUTBKDB [/q] [/i] /o <output_path>
/q = quiet mode (no prompts/messages)
/i = interactive (GUI) mode
/o <output_path> = destination path for backup files(path must be local to the machine where this program is run)

Requirements -

  • The PC running the backup utility must have a working (connected to the server database) Keystone install.
  • It will work on a server or a workstation.
  • Adequate disk space.


Standard Configuration for Backup Batch Files

-This strategy creates 5 sets of backups, one for each day of the week. Check for adequate disk space.

Setup Batch Files

  1. Create the destination folder for the backup (e.g. D:\ccgh\backup)
  2. Copy Keystone_DB_Backup.zip to the backup destination directory D:\ccgh\backup\ and uzip.
  3. The assumed directories in the batch files are:
  • C:\Program Files\GivenHansco\CC\BIN\ for the Keystone program files (or C:\Program Files\GivenHansco\Keystone\BIN\)
  • D:\ccgh\backup for the database backup destination. Edit this line if required in each batch file.

Important: You can change the target destination, but it must be a permanent drive that is local to the server. Do not directly set the output to a network or removable storage device. Once the backup is completed locally, you can copy it to any other available location. See below for instructions on copying the backup directory.


Schedule Backups

Use windows "Scheduled Tasks" to schedule Keystone_DB_Backup_1.bat...Keystone_DB_Backup_5.bat for Monday...Friday Repeat these steps for each day's batch file:

  1. Open "Scheduled Tasks" from the Start>All Programs>Accessories>System Tools>Scheduled Tasks
  2. Start New Task Wizard
  3. Browse for batch file
  4. Select Perform Task Weekly and Day of Week
  5. complete wizard

There will be 5 Scheduled Tasks, one for each day of the week.

Regarding Tape and Harddisk Automated Backups

IMPORTANT: Please coordinate these instructions with your IT specialist.

  1. Schedule Keystone backup batch file to run before the tape backup (Allow enough time for completion)
  2. Do not include the Keystone live data files (.IB files) (e.g. D:\ccgh\data\ccw001.ib) in the tape backup specification.
  3. Include backup destination folder (e.g. D:\ccgh\backup) in the tape backup specification.

Automatic Copy of Backup Folder to Network Drive

To make a copy of the backup directory on another machine include a line such as the following in each batch file (copies backup directory to a shared directory on PC named manager)

xcopy E:\ccgh\backup\*.* \\manager\backup\  /E /C /Q /Y /D