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:
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).