CREATE BACKUP COLLECTION
The CREATE BACKUP COLLECTION statement creates a backup collection.
CREATE BACKUP COLLECTION collection_name (
TABLE table_name [, TABLE another_table_name ...]
) WITH (option = value [, ...]);
Parameters
-
collection_name— name of the backup collection to create. -
table_name— full path to a table to include in the collection. Multiple tables can be specified. -
Options:
STORAGE— storage backend for backups. Supported values:'cluster'— storage within the YDB cluster.
INCREMENTAL_BACKUP_ENABLED— enable incremental backup support. Set to'true'to enable incremental backups,'false'for full backups only.
Note
When choosing a name for the backup collection, please consider the common schema objects naming rules
Examples
Creating a backup collection with a single table:
CREATE BACKUP COLLECTION daily_backups (
TABLE orders
) WITH (
STORAGE = 'cluster',
INCREMENTAL_BACKUP_ENABLED = 'true'
);
Creating a backup collection with multiple tables:
CREATE BACKUP COLLECTION production_backups (
TABLE orders,
TABLE products,
TABLE customers
) WITH (
STORAGE = 'cluster',
INCREMENTAL_BACKUP_ENABLED = 'true'
);
See also
Was the article helpful?
Previous
Next