Backing Up Data44 Netscape Certificate Management System Command-Line Tools Guide • October 2001The backup and restore tools are simple Perl scripts; most Perl programmersshould find no difficulty in customizing or extending them. Read this chapter tofamiliarize yourself with how the scripts work as well as their capabilities andlimitations.The Perl scripts that perform the backup or restore are called from shell scriptsinstalled in the /cert-/ directory of every CMSinstance:• cmsbackup[.bat] copies all of the pertinent data and configuration files for aCMS instance, the local Administration Server, and local Netscape DirectoryServers that the instance uses into an compressed archive (a zip file). See“Backing Up Data” on page 44 for instructions on how to use this tool.• cmsrestore[.bat] opens a named archive, extracts the data, and uses it torestore the configuration of a CMS instance. You have the option to restoreeverything or to select a subset of the archived data. See “Restoring Data” onpage 49 for instructions on how to use this tool.Be aware that the backup archives contain sensitive information (for example, yourCMS key database). Protect the backup archives as carefully as you protect theserver itself. The backups are stored on a local disk by default. To avoid losing boththe current data and the backup because of a disk failure, move the backuparchives to another medium as soon as they are created. If possible, encrypt thearchives or store them on removable media in a secured location.Backing Up DataBacking up your data is actually a very simple process. You run the script, and itcreates an archive that you store securely. This section explains what the backuptool (cmsbackup) does and does not do so that you can plan your overall systemmaintenance and backup procedures.What the Backup Tool DoesThere is a script or batch file installed in the instance directory of every CMSinstance. This file calls the Perl script/bin/cert/tools/CMSBackup.pl (using a Perl 5.003 interpreterbundled with Certificate Management System). CMSBackup.pl does the following:• Creates a log file where all backup actions are logged• Creates a temporary backup directory