The backup and restore feature is key to ensuring high data reliability in OceanBase Database. This feature can be used by using pure SQL statements. OceanBase Database uses various features, including multi-replica disaster recovery, recycle bin, primary/standby cluster, and backup and restore to ensure high data reliability. The backup and restore feature is the ultimate method to protect user data.
The following list describes some common data exceptions:
Common data exceptions on a single server include disk errors, disk damage, and server breakdown. These exceptions can be resolved based on the multi-replica disaster recovery feature.
Common data exceptions across multiple servers include switch damage and IDC power failure.
The multi-replica mechanism of OceanBase Database ensures that services properly run if the minority of replicas fail. Data is automatically supplemented after the faulty node returns to a normal state.
If the majority of replicas fail, the multi-replica mechanism cannot automatically restore data. Generally, the restore in cold standby mode takes a longer period of time than that in hot standby mode. If a standby database is deployed, we recommend that you use the standby database as the new primary database to quickly resume services. If no standby database is deployed, you can use the backup and restore feature to restore data.
Manual operations that may cause data exceptions include table deletion, database deletion, row deletion, and improper application logic that generates dirty data.
For table and database deletion operations that are performed by mistake, we recommend that you use the recycle bin feature to restore data.
For accidental operations at the row level, or massive polluted data caused by application logic errors, we recommend that you use the backup and restore feature to restore data.
OceanBase Database supports two types of backup: data backup and log backup. Data backup indicates the backup of the baseline and compacted data at the storage layer, namely, the major SSTable and minor SSTable for the backup. Log backup indicates the backup of clogs generated at the transaction layer, including modified data in SSTables.
Cluster-level backup and tenant-level restore are supported. You can configure an allowlist to specify the tables or databases to be restored.