Creating a Database Backup

From NewHaven Software Wiki

Revision as of 18:32, 21 June 2023 by Dan hacker (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Overview

This article covers how to create a Database backup in CMS 8.0 or later.

Setting up CMS to create a daily backup

To have CMS automatically create a backup of your database to a specified folder, please follow the instructions below.

  1. Log into your PCI Administration account
  2. Select the PCI Administration drop-down menu
  3. Select Administration
  4. Select Daily Backup
  5. Select 'Perform the daily backup at the time and in the folder specified below'
  6. Under Time to Backup, set the time you wish the backup to be created.
  7. Check mark 'Truncate the log' (see below)
  8. Under 'Folder in which to create backup image' select Browse
  9. Highlight the folder you wish to create the backup in (Please note: The Sybase service, which by default runs as LocalSystem, cannot access network drives, only local.)
  10. Select Ok
  11. Select Save these settings now.

CMS will now create a backup to that specified folder, every day, at the time you have specified.

Important Info on Backup Routines

Your database is a single file and contains all of your data. This file is locked by the Sybase database server, however, and cannot be copied, moved, deleted, or backed up. Using the above backup schedule allows Sybase to create a copy of its live database without having to shut down the database server. This also allows for 24/7 operation without having to stop to facilitate a backup.

The backup of your database is almost all you need in order to recover from a catastrophe like a failed drive, stolen server, or office fire (we've seen all of these.) Make sure you're backing up nightly and taking/uploading copies offsite regularly. The rest of your CMS install can be reinstalled in minutes, drop your backup in, and your back in business. No need to backup or protect the rest of the files in the NewHaven Software server share. If, however, you are storing your own files under our directory, please consider if they should be backed up.

As of CMS TEN, there is one exception to the above. You'll also want a backup copy of your CMSdbo.ini file. This file does not change daily but it can change every 90 days or when a CMS update is installed. This file contains an encrypted portion of a partial password that CMS uses to access the database. Without this file, CMS cannot run and it is unique to you and your database. Be sure to also have a copy of this in your offsite backups and as part of any backup restoration procedure. If you do not have this file and need to restore a backup, the database file will have to be sent to NewHaven Software where the password can be reset. This process is time-consuming and is not part of standard support.

Truncating the Log

For normal operation, we recommend that you run with the Truncate option enabled. Truncation keeps the size of your log file down to only include database changes since your last backup. This will save space on your server and potentially improving performance. Typically you'd only run with truncation disabled if you're working with NewHaven Software Support to troubleshoot a problem that cannot be replicated and need to build up a log file over time.

Truncation occurs during the scheduled backup event but does not occur when creating an immediate backup (see below.)

Training Database

If you are running a Training database, chances are you do not need a backup of this and the daily backup should be disabled. If you decide that you want to backup the Training database as well, please do so to a different directory and backup time than your production database to avoid conflicts (the training database uses the same log file name.)

How to have CMS create an immediate backup of your database

  1. Log into your PCI Administration account
  2. Select the PCI Administration drop-down menu
  3. Select Administration
  4. Select Daily Backup
  5. Under 'Folder in which to create backup image' select Browse
  6. Highlight the folder you wish to create the backup in (Please note: CMS can NOT Create a backup to a networked drive, only local drives)
  7. Select Ok
  8. Select 'Immediately create a Backup Image in the specified folder'

CMS will create a backup to the folder you have specified.

Special Note About Mapped Drives/UNC

Sometimes there is a situation where the database backup service cannot access mapped drives. In this case it is necessary to use a UNC path instead. In order for CMS to interpret the path successfully, the double-backslash needs to be escaped using an additional double-backslash. So if your UNC path is \\myshare\backup, you need to enter it as \\\\myshare\backup.

Personal tools