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.
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. 
- Set the library path for the script:
 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. 
- 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: 
[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.gz
INFO    Cleaning up temporary files
WARN    Re-starting services:
WARN    backup Complete
Command line options
The options for the clarity_backup.pl command are described in the following table.
| Command option | Description | 
|---|---|
| -a | Creates an archive of files for jobs on or before a specific date (does not include configuration files). The -e argument is required with this command; -b is optional. | 
| -b | 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 | 
| -e | 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 | 
| {{code language="none"}} -r {{/code}} | Restores database and configuration files from a previous backup (saved as a .tar.gz file) using the -c option. | 
| -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. | 
| -t | Archives logs and jobs created during the date range. This option also archives the jobs with undefined timestamp. | 
| -v | Displays informational messages | 
| -w | 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.
Related topics
