Designate a backup as expired and delete it.

For help deciding how and when to expire backups, see the section on expiring backups in the Data Synchronization Tasks topic.

Synopsis

gpdr expire backup --backup-label <string> { --dr-restore-point <string> |  --force }

gpdr expire restore-points --backup-label <string> { --dr-restore-point <string> |  --force } [ --no-recurse ]

gpdr expire { -h | --help }

Description

The gpdr expire backup command deletes the following:

  • the actual physical data associated with the provided backup
  • the WAL archive and restore points associated with the provided backup
  • the WAL archive, restore points, and physical data associated with any incremental backups under the provided backup

The gpdr expire restore-points command deletes the following:

  • the WAL archive and restore points associated with the provided backup
  • the WAL archive and restore points associated with any incremental backups under the provided backup

Options

--backup-label
  • When passed to gpdr expire backup, specifies the label of the backup to expire. The corresponding dr-restore-point cannot be under the provided backup-label or any of its underlying incremental backups.

    • When passed to gpdr expire restore-points, specifies the label of the backup whose associated WAL archive and restore points are to be expired.
--dr-restore-point
The last successful restore point restored from in the recovery cluster.
  • When passed to gpdr expire backup, GPDR evaluates whether or not it is safe to expire the specified backup and the associated WAL and restore points; that is, whether doing so would prevent properly executing a continuous restore. If the restore point specified with --dr-restore-point precedes the last restore point of the given backup label, GPDR errors out.

    • When passed to gpdr expire restore-points, GPDR evaluates whether it is safe to expire the WAL archive and restore points associated with the specified backup; that is, whether doing so would prevent properly executing a continuous restore. If the restore point specified with --dr-restore-point precedes the last restore point of the given backup label, GPDR errors out.
--force
  • When passed to gpdr expire backup, tells GPDR to expire the specified backup and its associated WAL archive and restore points without validating whether doing so would prevent properly executing a continous restore.

    • When passed to gpdr expire restore-points, tells GPDR to expire the restore points and WAL archive associated with the specified backup without validating whether doing so would prevent properly executing a continuous restore.
Note

You must specify one of the two options --dr-restore-point or --force. As they are mutually exclusive, you cannot specify both in the same command.

--no-recurse : Optional. Expires the restore points of a full backup only while ignoring the restore points of any underlying incremental backups.

-h | --help
Displays a help message for the gpdr expire command.

Examples

Expire a full backup:

gpdr expire backup --backup-label 20220919-122516F --dr-restore-point 20231121-172843R

Expire an incremental backup:

gpdr expire backup --backup-label 20220919-122516F_20220919-122550I --dr-restore-point 20231121-172843R

Expire a full backup without validation:

gpdr expire backup --backup-label 20220919-122516F --force

Expire restore points from a full backup up to the recovery cluster's restore point:

gpdr expire restore-points --backup-label 20220919-122516F --dr-restore-point 20231121-172843R

Expire restore points from an incremental backup up to the recovery cluster's restore point:

gpdr expire restore-points --backup-label 20220919-122516F_20220919-122550I --dr-restore-point 20231121-172843R

Expire restore points from a full backup and do not recurse into the incremental backups:

gpdr expire restore-points --backup-label 20220919-122516F --dr-restore-point 20231121-172843R --no-recurse

Expire restore points from a full backup without validation:

gpdr expire restore-points --backup-label 20220919-122516F --force

See Also

gpdr

check-circle-line exclamation-circle-line close-line
Scroll to top icon