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.
Note
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.
Identify a location for the archive (.tar.gz file) that the utility will create.
Note
Ensure that you have adequate amount of storage available for a complete backup.
export LD_LIBRARY_PATH=/app/clarity/lib
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:
clarity_backup.pl -c
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.
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: [root@10.100.5.158 bin]#./clarity_backup.pl -c -l /tmp/clarity_backup.log -d /tmp/manager_backup-
2013-08-05-2022.tar.gz
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.gzINFO Cleaning up temporary files
WARN Re-starting services:
WARN backup Complete
The options for the clarity_backup.pl command are described in the following table.
Command option | Description |
---|---|
| 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 |
-c | 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>). |
-d | Specifies the destination .tar.gz file that the backup will be written to |
| Displays the ending date in format YYYY-MM-DD. |
-h | Displays usage information. Used with -v (--h [-v] or --help [–verbose] ), displays additional detailed information. |
-k | 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. |
-l | 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 |
-s | 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. |
| Displays informational messages |
-w | Do not use. This option is deprecated and used only for backwards compatibility. |
Download the installation files after the backup is complete.