Restoring a Table to the Original Cluster
Scenario
You can create a table from a cluster or schema snapshot to the original cluster if the table was modified or deleted by mistake.
Notice
- If the current console does not support this feature, contact technical support.
- Only the tables stored in OBS can be used to restore data to the original cluster.
- Currently, only cluster- and schema-level snapshots can be used for such restoration.
- Restoration can be performed only if the snapshot and the cluster are both in the Available state.
- A table in a read-only cluster cannot be restored.
- Fine-grained restoration does not support tables in an absolute or relative tablespace.
Prerequisites
Manually enable the fine-grained snapshot.
- Choose Management > Snapshots. Alternatively, in the cluster list, click the name of the target cluster to switch to the Cluster Information page. Then, click Snapshots.
- Click Create Snapshot in the upper right corner. Alternatively, choose More > Create Snapshot in the Operation column.
- Click
next to Snapshot Level and click Set.
- On the Snapshot List page, toggle the fine-grained snapshot switch.
: enabled
: disabled
Note- If the fine-grained snapshot is enabled, you can restore specific tables from automatic or manual snapshots.
Procedure
- Log in to the GaussDB(DWS) console.
- In the navigation pane, choose Management > Snapshot.
- In the Operation column of a snapshot, click Restore.
- On the Restore Table page, configure the following parameters:
- Database: To restore a cluster snapshot, select a database. To restore a schema snapshot, select the database specified during backup. For details, see Creating a Manual Snapshot and Creating a Manual Snapshot of a Schema.
- Source Schema: Specify the schema of the table to be restored.
- Source Table: Specify the name of the table to be restored.
- Destination Schema: Specify the schema where the table is to be restored to.
- Destination Table: Specify the name of the new table.
Caution- A table name must meet the following GaussDB(DWS) database naming constraints: The table name is case sensitive can contain up to 63 characters. It must start with a letter or underscore (_). Letters, digits underscores (_) are allowed.
- The source table to be restored must be a table in the backup set, or the restoration will fail.
- If the target table already exists in the database, this table will be overwritten during restoration. Check the table name before starting restoration.
- Confirm the information and click Restore.
Parent topic: Restoration Using a Snapshot
- Scenario
- Prerequisites
- Procedure