HP XC System Software Administration Guide Version 3.1

6.6 Archiving Sensor Data from the Configuration Database
The managedb archive command enables you to remove sensor data records from the log tables. These
log tables are any tables in the configuration and management database that end in .Log. Archiving has
the advantage of decreasing the size of the log tables, which enables the shownode metrics command
to run more quickly.
You must be superuser to use this command.
Use the --archive archive-file option to specify the file to which the sensor data will be archived.
The --tmpdir directory option lets you assign a temporary directory for use while archiving.
You can retain previous archives with the --keep n option.
You can specify a time parameter with the managedb archive command; sensor data older than the
time parameter is purged. The time parameter (which can also be used with the managedb purge
command) is expressed in terms of hours, days, weeks, and years, as shown in the following table:
Archive (or Purge) All sensor Data:Time Parameter
Regardless of age (default)
now
Older than n hoursnh
Older than n daysnd
Older than n weeksnw
Older than n yearsny
The following example archives sensor data older than four days to an archive file named arfile_tuesday
in the current directory:
# managedb archive --archive ./arfile_tuesday 4d
Be sure to archive the configuration and management database on a regular basis (at least monthly) to
save disk space.
For more information on the managedb command, see managedb(8).
The archive.cron script enables you to automate the process of archiving sensor data from the CMDB.
For more information on this script, see archive.cron(4).
6.7 Restoring the Sensor Data from an Archive File
You can restore sensor data archived in an archive file to the configuration and management database
with the managedb restore --archive command.
You must be superuser to use this command.
Archive files are created with the managedb archive command. See Archiving Sensor Data from the
Configuration Database” (page 80).
The following example restores the sensor data archived in an archive file named arfile_tuesday in
the current directory:
# managedb restore --archive ./arfile_tuesday
For more information, see managedb(8).
6.8 Purging Sensor Data from the Configuration and Management
Database
Use the managedb purge command to remove sensor data from the configuration and management
database without archiving them.
You must be superuser to use this command.
80 Managing the Configuration and Management Database