Table of Contents Previous Next



5.4.7 MANAGE
The MANAGE subcommand evaluates, marks, and deletes backups based upon the retention policy. The MANAGE subcommand also invokes compression on the archived WAL files based upon the wal_compression parameter.
bart MANAGE [ –s { server_name | all } ]
-i { backup_id | backup_name | all } ]
Note: Do not invoke the MANAGE subcommand while the BART BACKUP subcommand is in progress. Backups affected by the backup process will be skipped and ignored by the MANAGE subcommand.
Application of a retention policy is dependent upon the retention_policy parameter in the BART configuration file. Management of backups such as evaluating the backups according to the retention policy, marking their status, and deleting obsolete backups are then performed with the MANAGE subcommand. See Section 5.2 for information on retention policy management.
WAL compression is controlled by the wal_compression parameter in the BART configuration file. See sections 4.1 and 4.2.5 for information on setting this parameter.
When the MANAGE subcommand is invoked, several different actions may be performed simultaneously. The following summarizes the actions performed under certain conditions and options.
When the MANAGE subcommand is invoked with no options or with only the -s option to specify all or a particular database server, the following actions are performed:
For the server specified by the -s option, or for all servers if -s all is specified or the -s option is omitted, active backups are marked as obsolete in accordance with the retention policy.
All backups that were marked obsolete or keep prior to invoking the MANAGE subcommand remain marked with the same prior status.
When the MANAGE subcommand is invoked with any other option besides the -s option, the following actions are performed:
For the server specified by the -s option, or for all servers if -s all is specified or the -s option is omitted, the action performed is determined by the other specified options (that is, -l to list obsolete backups, -d to delete obsolete backups, -c to keep or to return backups to active status, or -n to perform a dry run of any action).
All backups that were marked obsolete or keep prior to invoking the MANAGE subcommand remain marked with the same prior status unless the -c option (without the -n option) is specified to change the backup status of the particular backup or all backups referenced with the -i option.
Compression of archived WAL files is not permitted for database servers on which incremental backups are to be taken. In other words, parameters wal_compression and allow_incremental_backups cannot both have an enabled effect on the same database server.
When the RESTORE subcommand is invoked, if the -c option is specified or if the enabled setting of the copy_wals_during_restore BART configuration parameter is in effect for the database server, then the following actions occur: If compressed, archived WAL files are stored in the BART backup catalog and the location to which the WAL files are to be restored is on a remote host relative to the BART host, then the archived WAL files are transmitted across the network to the remote host in compressed format, but only if the gzip compression program is accessible in the PATH of the remote user account that is used to log into the remote host when performing the RESTORE operation. This remote user is specified with either the remote_host parameter in the BART configuration file (see Section 4.2.5) or the RESTORE -r option (see Section 5.4.8). Transmission of compressed WAL files results in less network traffic. After the compressed WAL files are transmitted across the network, the RESTORE subcommand uncompresses the files for the point-in-time recovery operation.
When the RESTORE subcommand is invoked without the -c option and the disabled setting of the copy_wals_during_restore BART configuration parameter is in effect for the database server, then any compressed, archived WAL files needed for the RESTORE operation are uncompressed in the BART backup catalog. The uncompressed WAL files can then be streamed to the remote host by the restore_command in the recovery.conf file when the database server archive recovery begins.
-s, --server { server_name | all }
server_name is the name of the database server to which the actions are to be applied. If all is specified or if the -s option is omitted, the actions are applied to all database servers.
-l, --list-obsolete
-d, --delete-obsolete
-c, --change-status { keep | nokeep }
Change the status of a backup to keep to retain it indefinitely. Specify nokeep to change the status of any backup, regardless of its current marked status, back to active status. The backup can then be re-evaluated and possibly be marked to obsolete according to the retention policy by subsequent usage of the MANAGE subcommand. Note: The –i option must be included when using the -c option.
-i, --backupid { backup_id | backup_name | all }
backup_id is an integer, backup identifier. backup_name is the user-defined alphanumeric name for the backup. If all is specified, the actions are applied to all backups. Note: The -i option must only be used with the -c option.
-n, --dry-run
Displays the results as if the operation was performed, however, no changes are actually made. In other words, a test run is performed so that you can see the results prior to actually implementing the actions. Thus, -n specified with the -d option displays which backups would be deleted, but does not actually delete the backups. Specifying the -n option with the -c option displays the keep or nokeep action, but does not actually change the backup from its current status. Specifying -n alone with no other options, or with only the -s option, displays which active backups would be marked as obsolete, but does not actually change the backup status. In addition, no compression is performed on uncompressed, archived WAL files even if WAL compression is enabled for the database server.
The following example uses the enabled wal_compression parameter in the BART configuration file as shown by the following:
When the MANAGE subcommand is invoked, the following message is displayed indicating that WAL file compression is performed:


Table of Contents Previous Next