Space banner

   

This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Archiving, restoring jobs, and creating backup files

Using the clarity_backup.pl script, you can archive and then restore information about BMC Database Automation jobs for a date range that you specify. Archives back up and delete process files only. However, you can create backup files of all state, configuration and log information. The backup script is stored in the following location on the Manager:

/app/clarity/manager_scripts/bin/clarity_backup.pl

To archive files

  1. Set the library path for the script:
    export LD_LIBRARY_PATH=/app/clarity/lib
  2. Run the script:
    1. To create a full backup archive on or before a specific date, type the following command:

      clarity_backup.pl -a -e YYYY-MM-DD

For example, to archive and remove all files on or before the last day of November, 2013, type one of the following:

clarity_backup.pl -a -e 2013-11-30

clarity_backup.pl -a archive --end_date 2007-11-30

Note

Archiving also removes any un-usable job files left on disk (typically, these are jobs that failed pre-verification tests). After archiving is complete, these jobs no longer appear in the GUI unless their archive is restored (see next section for more information).

To restore the backup archive

  1. Set the library path for the script:
    export LD_LIBRARY_PATH=/app/clarity/lib
  2. Run the script:
    1. To restore a full backup archive of a manager in a single configuration, type the following command:

      clarity_backup.pl -r /path/to/archive.tar.gz

    2. To restore a full backup archive of a Content Manager in a Multi-manager configuration, type the following command:

      clarity_backup.pl -r -k /path/to/archive.tar.gz

      Using this syntax backs up a Content Manager in a mesh and populates the backup on Satellite Managers. Because /app/clarity/dmanager/etc on slave managers contain host-specific files that should not be changed (such as SSL certificates, mtd.conf, mesh.conf, and so forth), using the -k option enables you to omit this data from the restore process.

      Note

      When restoring a Content Manager from a backup, each Satellite must also be restored from its own backup. The backups that you intend to use for each Satellite must be from an earlier date/time than the backup that was restored on the Content Manager. The mesh will then quickly recover, since a node or database that connected which is missing from the Satellite dstate but is present in the Content Manager dstate will get found, and objects that have been removed since the backup will display as down/broken objects in the Satellite GUI.

      No additional steps are required for the Satellite Manager to resume its function in the mesh.

User example of archiving and restoring the archive

For example, to archive all logs and jobs between April 1 and April 7 2010:
export LD_LIBRARY_PATH=/app/clarity/lib
clarity_backup.pl -a -b 2010-04-01 -e 2010-04-20 -s -v

To restore the archive in the example:
export LD_LIBRARY_PATH=/app/clarity/lib
clarity_backup.pl -r clarity_backup-2010-04-19-31943.zip -v

Note

To view the restored logs and jobs in the Management Console, you must wait to log in by using the GUI until the restoration of the archive is completed.

To validate that you have restored the backup correctly, see Validating the restored archive.

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

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

-z

Specifies to not use gzip to archive or unarchive the .tar file

Note: This option must be specified after the .tar file. For example:

[root@suprh5x64dbavm01 bin]# ./clarity_backup.pl -c -l /app/clarity/clarity_back  up.log -d /app/clarity/clarity_backup.tar -z

Where to go from here

Creating a backup

Related topics

Disaster Recovery

Was this page helpful? Yes No Submitting... Thank you

Comments