Backing Up CNG SAFE Version 6.0 The CNG-Server consists of 3 components. 1. The CNG Services (Server, Full Text Search and Workflow) 2. The data file repository 3. The SQL Server Databases The three services are used to run CNG and to communicate to the client systems and the SQL Server database. They must be running in order for CNG to operate successfully. It
is recommended that backup copies of the CNG components be maintained at an off-site location. The data file repository contains the files that are stored in CNG. The primary SQL Server database contains the metadata for most of the information required by CNG-SAFE; this includes a cabinet listing, folder listing for each cabinet, document listing for each document etc. If your disaster recovery or backup program does not account for these three components it may cause data loss or failure. In any disaster recovery scenario you must have all three of these components in order to return CNG to a functional state. They can be installed on a single computer system or each component may be installed on a separate computer system. CNG recommends that you backup your SQL Server databases and the data file repository on a rotating backup schedule to ensure that recovery from disaster can be accomplished. The CNG Services (CNG Server) requires an installation, which can either be accomplished through a physical file on your backup medium or it may also be downloaded from the CNG Support Site at: http://helpdesk.cabinetng.com/hcbase/account/index.aspx. The version of CNG Server must match the SQL Server database as changes are sometimes made to the database with updated versions. The data file repository contains the physical files in an.eot file format that are stored within CNG. The folder structure for these files are CNG, a sub-folder for cabinet, a subfolder for each folder and the actual documents. You do not want to rename any of these structure components as it will cause a loss of data. The data file repository must be backed up at least daily and the files in the repository must match the SQL Server database for accurate document management. In other words, if you restore a data file repository that is two weeks old and restore a SQL Server database that is a day old, then the data file repository will be lacking physical documents for which a pointer will exist in SQL Server. For the end user, they would see a document in the client but would be unable to do anything with this document since the physical document would not be available. The data file repository may be backed up using any backup software program or alternatively it may also simply be copied to a back up medium. The SQL Server databases contain the metadata for the information that is configured and stored in CNG-SAFE. There needs to be at least two databases, a main data database and a CNGForms database that is used for Forms data. There may be additional system databases as well. The SQL Server databases need to be backed up routinely as part of a disaster recovery program. The SQL Server databases may be backed up with any software program that supports SQL Server. You may also back up the databases through a scheduled process and then backup the resulting.bak file to a back up medium. Instructions to perform that process are listed below.
SQL Server Back-Up Instructions: Summary: The object in this process is to create a backup script for the CNG databases and then use the Windows Scheduling Program to execute these scripts on a schedule. Process: The first step is to create a folder that will contain the script file that will be created and the backup files for the CNG databases. The recommended location for this folder is in the CNG Data directory where the CNG data file repository is kept. Name this folder something like cngsqlbackup. The next step is to login to the SQL Management Studio Express. First create the SQL script file; this is done in the management studio module by right clicking on the database, going to tasks and then backup.
This will bring up the backup configuration screen. Set the backup type to full and change the destination to the desired location or the folder that you created earlier. This will default to the SQL Server folder in program files, you may remove this location only after you create a new one.
Next, click on the options page and chose your backup method. An incremental (append) backup method will allow you to restore the database to different backup sets (dates) and a full (overwrite) backup will overwrite any existing backup files with the new one. These are both valid choices, an incremental allows for more flexibility in restoring the database but the file size will continue to grow larger. A full backup will produce a full database backup that will match the data file repository for that backup session. It is always recommended that you verify the backup when finished. At the top of the screen there is a script button that allows you to script it to a file. Select script action to file.
Navigate to the folder that you created earlier and give the script file a name. The file should look something like this: BACKUP DATABASE [CNG_Main] TO DISK = N'd:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Backup\CNG_Main.bak' WITH NOFORMAT, NOINIT, NAME = N'CNG_Main-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO
Scheduling: Now that we have a SQL script file that backed up the CNG database, set up a scheduled task to run it programmatically. The file that is provided by SQL Server to run script files is called SQLCMD.EXE and this is the file needed to invoke the scheduling process. The switches for the SQLCMD.EXE file are CASE SENSITIVE! And if you are running it on the same server as the database you CAN'T have the server name in the path, only the instance name such as \SQLEXPRESS. To see the list of supported switches for the SQLCMD.EXE file open a command prompt and type "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE /?" or the correct path to the file. The switches we are concerned with are: A. S This is the switch to identify the server B. U This is the switch to identify the user that has backup privileges C. P This is the switch for the user password, this password will be clear text D. i This is the switch to identify the input file, this is the only lower case switch used The finished command line prompt should look like this: "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE" -S \SQLEXPRESS -U cngadmin -P cng -i "D:\CNGServer\cngsqlbackup.sql" This needs to be tested before use. You may enter this command in a command window to ensure that it processes the SQL file properly and creates the backup file. Once you are satisfied that it is working properly then use Windows Scheduler to schedule it. The Windows Schedule service will vary between operating systems but this is where the task is created and the time interval is set to run the backup process.
This will create a backup file every night based on the parameters you specified when you created the SQL file. This process needs to be done for all CNG databases.