Page tree

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.

To create a backup

  1. Log into the BMC Database Automation Manager as root by using SSH client (PuTTY).
  2. Navigate to the /app/clarity/manager_scripts/bin directory, where the clarity_backup.pl script is located.
  3. 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. 

  4. Set the library path for the script:
    export LD_LIBRARY_PATH=/app/clarity/lib
  5. 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

-cCreates 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.

-hDisplays usage information. Used with -v (--h [-v] or --help [–verbose]), displays additional detailed information.
-kRestores 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

-r

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.

-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

Archiving, restoring jobs, and creating backup files

Disaster recovery