Backing up the database


You can manually create backup files of the BMC AMI Ops Insight database to preserve snapshots of your data, or you can schedule regular automatic backups of the database.

Back up files are displayed on the list on the Backup page. The following details are displayed:

Column

Description

Description

Name of the backup file with the description underneath

Directory Name

USS directory name where the backup of the database is stored

You must have write access for this path and sufficient space to store the data.

Created

Date and time the backup file was created and the user who initiated the backup

To manually back up your database

  1. Click the Administration icon Gear Icon.PNG in the title bar. 
  2. Click General Settings > Backup in the menu on the left side.
  3. Click New_Backup_button.png.
    Backup.png
  4. In the New Backup dialog, enter the Directory Name, and Description.

    Important

    Backup files are not compressed. Make sure you have sufficient space available in the target directory.

  5. Click Backup_now_button.png.

    Important

    Whether manual or automated, each backup is stored in its own directory within a parent directory specified in the db_backup_directory.  For more information, see db_backup_directory.

To configure automatic database backups

  1. In < Installation_Directory >/aoidata/aoiinst/conf, open the amipdt.properties file.
  2. Scroll down to the BMC AMI Manager DB Clean Config section.
  3. Set the following parameters:

    Parameter

    Description

    db_backup

    Turns automatic backup on or offValid values are:

    • true
    • false

    Default value is true.

    db_backup_time

    Cron expression indicating the time of day to run the automatic backup

    You can use an online cron expression generator with the following adaptations:

    • Make sure your cron expression only has six elements. If there is a seventh element, remove it. 
    • Replace spaces with underscores.

    Important

    Cron expression times refer to local time of your Db2 installation.

    The default value is to run at five minutes after midnight every day and is displayed as in the following example:

    # At 00:05:00am every day
    db_backup_time=0_05_0_?_*_*
    {{id name="Backingupthedatabase-db_backup_directory"/}}

    db_backup_directory

    Absolute path of the Parent directory for your database backups

    Important

    Backup files are not compressed. Make sure you have sufficient space available in the parent directory.

    Each manual and automated backup is stored in its own directory within this parent directory. 

    BMC AMI Manager must have write access to the parent directory.

    If you don't set a parent directory, the application creates a default backup directory in <Installation_Directory>/aoidata/aoiinst/backups.

    Warning

    Don't store other files in the backup directory. Other files that are stored here are deleted when you restart BMC AMI Manager.

    db_backup_count

    The number of automatic backups to keepIf you have the maximum number of automatic backups, each time a new automatic backup runs, the oldest existing automatic backup is deleted.

    Default: 2

  4. Save the amipdt.properties file.
  5. Restart BMC AMI Manager for your changes to take effect.

To restore your database from a backup

Warning

When you restore your database, the restored backup and all backups in the backup directory that have a later timestamp than the restored backup are deleted. If you want to save any of these backups, we recommend that you move them to a different directory.

When you restore your database, it may include metadata for earlier backups that are no longer available. As part of the backup process, this metadata is deleted.

  1. On z/OS, shutdown the BMC AMI Manager started task. This also shuts down MLeap and the database.
  2. Delete all files and directories from <Installation_Directory>/aoidata/aoiinst/db/repos/
  3. Copy the files from the desired backup directory into the <Installation_Directory>/aoidata/aoiinst/db/repos/ directory.
  4. On z/OS, restart the BMC AMI Manager started task. This also restarts the MLeap and the database.

After restoring the database, you can connect to it as usual.

 

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