SAVE RESTORE POINT TO ARCHIVE

Eon Mode only

Saves an in-database restore point to an archive. A restore point can include the full database or a subset of database objects and their dependent objects.

After a full-database restore point is saved, you can revive the database to the state at which the restore point was saved. For details on reviving your database from a restore point, see Revive from a restore point. To restore objects from a restore point, see RESTORE FROM ARCHIVE.

Syntax

SAVE RESTORE POINT TO ARCHIVE archive-name
    [ OBJECTS ( object-inclusion-rules ) ]

Arguments

archive-name
Name of the archive to which the restore point is saved.
object-inclusion-rules
One or more rules that specify the objects to include in the restore point. These rules override any default object inclusion rules on the archive.

You can specify exact object names or use ILIKE patterns. You can also exclude objects from the included set. For example:

  • INCLUDE SCHEMA store
  • INCLUDE SCHEMATA ILIKE store_%
  • INCLUDE TABLE store.orders
  • INCLUDE TABLES ILIKE store.%
  • INCLUDE SCHEMA store, EXCLUDE TABLE store.stage_orders

Privileges

Superuser or archive owner

Examples

The following statement saves a restore point to the verticadb archive:

=> SAVE RESTORE POINT TO ARCHIVE verticadb;
SAVE RESTORE POINT

The following statement saves an object-level restore point to the object_backup archive that includes the store schema:

=> SAVE RESTORE POINT TO ARCHIVE object_backup OBJECTS ( INCLUDE SCHEMA store );
SAVE RESTORE POINT

The following statement saves an object-level restore point that includes the store.orders table:

=> SAVE RESTORE POINT TO ARCHIVE object_backup OBJECTS ( INCLUDE TABLE store.orders );
SAVE RESTORE POINT

To view all restore points in the database, 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)

See also