The DELETE subcommand removes the subdirectory and data files from the BART backup catalog for the specified backups along with archived WAL files.
Syntax:
Note that when invoking the DELETE subcommand, you must specify a database server.
For database servers under a retention policy, there are conditions where certain backups may not be deleted. For more information, see the EDB Backup and Recovery User Guide available at the EDB website.
The following table describes the DELETE options:
Options
Description
-s <server_name> --server <server_name>
<server_name> is the name of the database server whose backups are to be deleted.
<backup_id> is the backup identifier of the backup to be deleted. <backup_name> is the user-defined alphanumeric name for the backup. Multiple backup identifiers and backup names may be specified in a comma-separated list. The list must be enclosed within single quotes if there is any white space appearing before or after each comma (see Example). If all is specified, all backups and their archived WAL files for the specified database server are deleted.
-n --dry-run
Performs the test run and displays the results prior to physically removing files; no files are actually deleted.
Example
The following code sample demonstrates deleting a backup from the specified database server:
After the deletion, the BART backup catalog for the database server no longer contains the corresponding directory for the deleted backup ID. The following code sample displays information about archived_wals subdirectory that no longer contains the backup WAL files:
The following code sample demonstrates deleting multiple backups from the database server.
Deleting Multiple Backups with Space Characters
The following code sample demonstrates deleting multiple backups; since there are space characters in the comma-separated list, the entire list must be enclosed within single quotes: