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:

      {{code language="none"}}
      clarity_backup.pl -a -e YYYY-MM-DD
      {{/code}}

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

{{code language="none"}}
clarity_backup.pl -a
{{/code}}
-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:

      {{code language="none"}}
      clarity_backup.pl -r /path/to/archive.tar.gz
      {{/code}}
    2. To restore a full backup archive of a Content Manager in a Multi-manager configuration, type the following command:

      {{code language="none" source="string:{{code language=~"none~"~}~}
      clarity_backup.pl -r -k /path/to/archive.tar.gz
      {{/code~}~}"/}}{{/code}}

      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 {{code language="none"}}-k{{/code}} option enables you to omit this data from the restore process.

      {{confluence_note title="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.
      {{/confluence_note}}
      )))

      == {{id name="Archiving,restoringjobs,andcreatingbackupfiles-Userexampleofarchivingandrestoringthearchive"/}}User example of archiving and restoring the archive ==

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

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

      {{confluence_note title="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.
      {{/confluence_note}}

      To validate that you have restored the backup correctly, see [[Validating the restored archive>>doc:More-Products.Database-Automation.BMC-Database-Automation.bda89.Planning.Deployment-architecture.Disaster-Recovery.WebHome||anchor="DisasterRecovery-Validatingtherestoredarchive"]].

      == {{id name="Archiving,restoringjobs,andcreatingbackupfiles-Commandlineoptions"/}}Command line options ==

      The options for the **clarity_backup.pl** command are described in the following table.

      |=(((
      Command option
      )))|=(((
      Description
      )))
      |(((
      {{code language="none"}}
      -a
      {{/code}}
      )))|(((
      Creates an archive of files for jobs on or before a specific date (does not include configuration files). The {{code language="none"}}-e{{/code}} argument is required with this command; {{code language="none"}}-b{{/code}} is optional.
      )))
      |(((
      {{code language="none"}}
      -b
      {{/code}}
      )))|(((
      Specifies the beginning date of the archiving job history in format, YYYY-MM-DD
      )))
      |(((
      {{code language="none"}}
      -c
      {{/code}}
      )))|(((
      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>).
      )))
      |(((
      {{code language="none"}}
      -d
      {{/code}}
      )))|(((
      Specifies the destination **.tar.gz** file that the backup will be written to
      )))
      |(((
      {{code language="none"}}
      -e
      {{/code}}
      )))|(((
      Displays the end date in format, YYYY-MM-DD.
      )))
      |(((
      {{code language="none"}}
      -h
      {{/code}}
      )))|(((
      Displays usage information. Used with {{code language="none"}}-v{{/code}} ({{code language="none"}}--h [-v] or --help [–verbose]{{/code}}), displays additional detailed information.
      )))
      |(((
      {{code language="none"}}
      -k
      {{/code}}
      )))|(((
      Restores from a backup when used in conjunction with the {{code language="none"}}-r{{/code}} 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.
      )))
      |(((
      {{code language="none"}}
      -l
      {{/code}}
      )))|(((
      Redirects stdout and stderr to the log file
      )))
      |(((
      {{code language="none" source="string:{{code language=~"none~"~}~}
      -r
      {{/code~}~}"/}}
      )))|(((
      Restores database and configuration files from a previous backup (saved as a **.tar.gz** file) using the {{code language="none"}}-c{{/code}} option.
      )))
      |(((
      {{code language="none"}}
      -s
      {{/code}}
      )))|(((
      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.
      )))
      |(((
      {{code language="none"}}
      -t
      {{/code}}
      )))|(((
      Archives logs and jobs created during the date range. This option also archives the jobs with undefined timestamp.
      )))
      |(((
      {{code language="none"}}
      -v
      {{/code}}
      )))|(((
      Displays informational messages
      )))
      |(((
      {{code language="none"}}
      -w
      {{/code}}
      )))|(((
      Do not use. This option is deprecated and used only for backwards compatibility.
      )))
      |(((
      {{code language="none"}}
      -z
      {{/code}}
      )))|(((
      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##
      )))

      == {{id name="Archiving,restoringjobs,andcreatingbackupfiles-Wheretogofromhere"/}}Where to go from here ==

      [[doc:More-Products.Database-Automation.BMC-Database-Automation.bda89.Installing.Applying-maintenance-patches-or-fixes.Creating-a-backup.WebHome]]

      == {{id name="Archiving,restoringjobs,andcreatingbackupfiles-Relatedtopics"/}}Related topics ==

      [[doc:More-Products.Database-Automation.BMC-Database-Automation.bda89.Planning.Deployment-architecture.Disaster-Recovery.WebHome]]

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*