This topic describes the physical restore process.
Restore data at the tenant level
OceanBase Database provides tenant-level restore capabilities and supports full restore and partial restore to the specified system change number (SCN) or timestamp. An SCN is a precise data version number in OceanBase Database. A timestamp in Oracle mode is accurate to nanoseconds, without precision loss. A timestamp in MySQL mode is accurate to microseconds, with the precision after microseconds lost.
Tenant-level restore ensures global consistency across tables and partitions.
The tenant-level restore process in OceanBase Database is as follows:
RootService creates the required log streams based on the backup data.
The leader of the log streams dispatches the data and logs restored on it, and the followers pull data and logs from the leader.
After RootService detects that all log streams are restored, it considers that tenant data restore is completed.
For a single partition, the backup and restore process is similar to the server restart process and involves the loading of data and application logs.
Restore data at the table level
Physically restore the auxiliary tenant to the specified point in time by using the backup data.
Import the specified table from the auxiliary tenant to the target tenant.
Clear the auxiliary tenant.
Restore transaction consistency
In OceanBase Database, physical backup and restore depends on the Global Timestamp Service (GTS) feature of tenants. GTS ensures global consistency between the backed up and restored data.