Creating a backup
This topic describes how to create a complete backup (including configuration files) of your BMC Database Automation environment using the clarity_backup.pl script. BMC Software strongly recommends that you create a full backup of your environment before installing a service pack or patch, even if you have a backup strategy in place.
This script brings the management server offline during script runtime. The amount of downtime incurred is a function of the amount of data to be backed up and performance of the system, but a good estimate would be 15-30 minutes. In addition to the file-level backup, the Postgres database is shutdown for an offline backup. This means there will be a service disruption during the time in which the backup is done. You must plan accordingly.
To create a backup
- Log into the BMC Database Automation Manager as root by using SSH client (PuTTY).
- Navigate to the /app/clarity/manager_scripts/bin directory, where the clarity_backup.pl script is located.
Identify a location for the archive (.tar.gz file) that the utility will create.
Ensure that you have adequate amount of storage available for a complete backup.
- Set the library path for the script:
Run the script:
To create a backup archive in the current directory (in the format clarity_backup-YYYY-MM-DD-PID.tar.gz), type the following command:
To create a backup in a specified file destination (where the script creates the backup file with default name clarity_backup-YYYY-MM-DD-PID.tar.gz), type the following command:
clarity_backup.pl -c -d /tmp/clarity_backup/
Using this syntax, /tmp/clarity_backup/clarity_backup-YYYY-MM-DD-PID.tar.gz is created.
- To create a backup with a specified file name (where the script creates the backup file with a custom name <filename>.tar.gz), type the following command:
clarity_backup.pl -c -d /tmp/clarity_backup/mybackup.tar.gz
Using this syntax, /tmp/clarity_backup/mybackup.tar.gz is created.
When the utility runs successfully, output messages similar to the following are displayed:
[firstname.lastname@example.org bin]#./clarity_backup.pl -c -l /tmp/clarity_backup.log -d /tmp/manager_backup-
WARN Backup using /root/clarity_backup-2013-08-05-2022.tar.gz
WARN Stopping services
INFO Extracting postgres data
INFO Backing up configuration and state files
INFO gzipping /root/clarity_backup-2013-08-05-2022.tar...
INFO Validating archive: /root/clarity_backup-2013-08-05-2022.tar.gz
INFO Cleaning up temporary files
WARN Re-starting services:
WARN backup Complete
For Multi-Manager environments, the Content Manager and each Satellite Manager must be backed up using the following steps:
- Back up all Satellite Managers.
- After the backup has completed on the Satellite Managers, back up the Content Manager.
Command line options
The options for the clarity_backup.pl command are described in the following table.
Creates an archive of files for jobs on or before a specific date (does not include configuration files). The
Specifies the beginning date of the archiving job history in format YYYY-MM-DD
|Creates a full backup of the current system and its configuration data. The output file from this operation is the argument provided for recovery (-r <file>).
Specifies the destination .tar.gz file that the backup will be written to
Displays the ending date in format YYYY-MM-DD.
|Displays usage information. Used with
--h [-v] or --help [–verbose]), displays additional detailed information.
|Restores from a backup when used in conjunction with the
-r option. This command omits host-specific data and configuration files stored in the /app/clarity/dmanager/etc/ directory (such as SSL certificates and related files, and mtd.conf, dmananger.conf, and mesh.conf) from the restored backup that could potentially be overwritten and impact host behavior.
Redirects stdout and stderr to the log file
Restores database and configuration files from a previous backup (saved as a .tar.gz file) using the
Skips the stop or start services cycle and to keep the Manager and database running. This is useful for archiving, but not recommended for full backups.
|Archives logs and jobs created during the date range. This option also archives the jobs with undefined timestamp.
Displays informational messages
Do not use. This option is deprecated and used only for backwards compatibility.
Where to go next
Download the installation files after the backup is complete.