HP XC System Software Administration Guide Version 2.1

5.4 Backing Up the Configuration Database
The managedb backup command allows you to copy all the da ta from the configuration and
management database into a backup file; the database remains intact during the b ackup. You
can use this backup file to restore the database at a later time, if needed.
You mu st be superuser to use this command.
Here is an example of the managedb backup command that backs up the cmdb. When a file
name is unspecified, the managedb backup command stores the data in a file whose name is
/opt/hptc/database/cmdbbackup-YYMMDDhhmmss.sql where YYMMDDhhmmss
isadateandtimestamp.
# managedb backup
Use the managedb restore command to reinstate the database from the backup file.
See the managedb
(8) manpage for more information.
_________________________ Note _________________________
It is the responsib
ility of th e site and the s ystem administrator to determine how
often t he cmdb is
backed up.
5.5 Restoring the Configuration Database from a Backup File
Use the managedb restore command to restore the cmdb from a backup file.
The follo wing commands display the nam e of the back up file in the /opt/hptc/database
directory and restore the cmdb from the backup file found there:
# ls /opt/hptc/database/cmdbbackup-*.sql
/opt/hptc/database/cmdbbackup-20050925164600.sql
# managedb restore /opt/hptc/database/cmdbbackup-20050925164600.sql
5.6 Archiving Metrics Data from the Configuration Database
The managedb archive comm and enables you to remove metrics data r ecords from the log
tables. These log tables are any tables in the configuration and management database that end
in Log. Archivin g has the advantage of decreasing the size of the log tables, which enables
the shownode metrics command to run more quickly.
You mu st be superuser to use this command.
Use the --archive archive-file option to specify the file to w hi ch the metri cs data
will be archived.
The --tmpdir directory o ption lets you assign a temporary directory for use while
archiving.
You can retain previous directories with the --keep n option.
You can specify a time parameter with the managedb archive comm a nd; metrics data
older than the time parameter is purged. The time param eter (which can also be used with
the managedb purge com mand) is expressed in terms of hours, days, weeks, and years, as
shown in the following table:
Time Parameter Archive (or Purge) All Metrics Data:
now
Regardless of age (default)
nh
Older than n hours
nd
Older than n days
Managing the Configuration and Management Database 5-3