REMOVE RESTORE POINT FROM ARCHIVE

Eon Mode only

Removes a in-database restore point from an archive.

To remove a specific restore point, you must specify either its index in the archive or its unique object ID. You can find both of these identifiers by querying the ARCHIVE_RESTORE_POINTS system table. If neither of these identifiers are provided, the oldest restore point in the archive is removed.

Syntax

REMOVE RESTORE POINT FROM ARCHIVE archive-name { INDEX restore-point-index | ID restore-point-id }

Arguments

archive-name
Name of the archive from which to remove the restore point.
restore-point-index
Index of the restore point to remove, where index 1 specifies the most recently saved restore point.
restore-point-id
Unique object ID of the restore point to remove.

Privileges

Superuser or archive owner

Examples

To view all restore points, including unique object IDs and indexes, query the ARCHIVE_RESTORE_POINTS system table:

=> SELECT * FROM ARCHIVE_RESTORE_POINTS;
                  id                  |         save_time          | index |  archive  |  state 
--------------------------------------+----------------------------+-------+-----------+----------
 2616f6cd-e98c-472c-8d5c-a7f459dff82b | 2021-12-10 10:19:58.565311 |     1 | verticadb | COMPLETE
 116066cc-29cb-4ce5-9a27-170538ba95cf | 2021-12-06 11:02:48.059941 |     2 | verticadb | COMPLETE
(2 rows)

The following statement removes the most recently saved restore point in the verticadb archive:

=> REMOVE RESTORE POINT FROM ARCHIVE verticadb index 1;
REMOVE RESTORE POINT

If you again query the ARCHIVE_RESTORE_POINTS table, the restore point will either appear with a status of REMOVING or, if the removal process has completed, is not listed:

=> SELECT * FROM ARCHIVE_RESTORE_POINTS;
                  id                  |         save_time          | index |  archive  |  state 
--------------------------------------+----------------------------+-------+-----------+----------
 2616f6cd-e98c-472c-8d5c-a7f459dff82b | 2021-12-10 10:19:58.565311 |       | verticadb | REMOVING
 116066cc-29cb-4ce5-9a27-170538ba95cf | 2021-12-06 11:02:48.059941 |     1 | verticadb | COMPLETE
(2 rows)

See also