Skip to main content

Home

Backup and archive metric database

Unravel's metBackup, is a utility for creating backups and archives for the metric database. Alternatively, you can use PostgreSQL pg_dump utility.

The metBackup is run on demand, either periodically as a cron job or as needed. It creates a single tar file containing the data backup. When a table or a partition is backed-up or archived, a log entry noting the time of the backup is added to the part_log file. The backup isn't validated.

metBackup takes advantage of the fact that frozen partitions are immutable and need to be backed-up only once. Optionally active partitions, i.e., not-yet-frozen, and the non-partitioned tables (node_desc, metric_desc, and part_log) can be backed-up.

The metBackup utility is invoked through the script met_backup.sh .

met_backup.sh [options]

By default, regardless of data creation date, only frozen partitions are backed-up, if and only if, they weren't previously backed-up.

Options

-f backupFile

Name of backup tar file. Default metBackup_currentTimeAsEpoch.

-d startDateAsEpoch

Backup only data created on or after this date.

-a

Backup active partitions and the non-partitioned tables, node_desc, metric_desc, and part_log.

-z

Backup frozen data, regardless of whether it was previously backed-up.

The retire thread is responsible for removing partitions past their expiration date. The normal procedure to retire the partition is to detach it from the parent table and delete it.

When archiving is enabled (see the doArchive configuration property):

Archived partitions are detached and deleted.
Non-archived partitions are detached. The part_log is then periodically checked to see if the partition has been archived. Once archived, the partition is deleted.