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 archived WAL and restore points associated with the provided backup
- the archived WAL, restore points, and physical data associated with any incremental backups under the provided backup
The gpdr expire restore-points
command deletes the following:
- the archived WAL and restore points associated with the provided backup
- the archived WAL 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 correspondingdr-restore-point
cannot be under the providedbackup-label
or any of its underlying incremental backups.When passed to
gpdr expire restore-points
, specifies the label of the backup whose associated archived WAL and restore points are to be expired.
--dr-restore-point
- The last successful restore point restored on the recovery cluster.
When passed to
gpdr expire backup
, GPDR evaluates whether or not it is possible to expire the specified backup from--backup-label
, the associated archived WAL for that backup, and its restore points. 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 possible to expire the archived WAL and restore points associated with the backup specified in--backup-label
. Only the specified backup's restore points (and its associated archived WAL) preceding the restore point specified with--dr-restore-point
will be considered for deletion. The implicit restore points created at the end of backup are never considered for deletion.
Make sure that only a successfully restored restore point is provided in the
--dr-restore-point
option. GPDR only evaluates whether or not it is possible to expire the specified backup and its associated archived WAL and restore points. GPDR does not validate whether or not the recovery cluster has been successfully restored up to the provided restore point. If the provided restore point has not been successfully restored on the recovery cluster, it may result in deleting archived WAL that has yet to be restored which may cause subsequent continuous restores to not be possible. It is recommended to use the restore point outputted from runninggpdr info restore
on the recovery cluster.
--force
When passed to
gpdr expire backup
, tells GPDR to expire the specified backup and its associated archived WAL and restore points without validating whether doing so would prevent properly executing a continuous restore.When passed to
gpdr expire restore-points
, tells GPDR to expire the restore points and archived WAL associated with the specified backup without validating whether doing so would prevent properly executing a continuous restore.
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
Content feedback and comments