Purpose
This statement specifies the original tenant-level archive and backup paths and the desired restore time to preview the data backup sets (backup_set) and log archives (archivelog_piece) required for the restore.
Privilege requirements
To execute this statement, the current user must have the ALTER SYSTEM privilege.
Syntax
ALTER SYSTEM RESTORE FROM 'uri' UNTIL { TIME='timestamp' | SCN=scn } PREVIEW;
Parameters
| Parameter | Description |
|---|---|
| uri | Specifies the original data backup path and log archive path, separated by commas. |
| TIME='timestamp' | SCN=scn | Specifies the desired restore timestamp or SCN. This parameter must be explicitly specified when executing the statement. |
Examples
OSS
Specifies the original data backup path and log archive path, and the desired restore SCN
1712650554000909004.obclient [oceanbase]> ALTER SYSTEM RESTORE FROM 'oss://test_bucket/data?host=***&access_id=****&access_key=****, oss://test_bucket/archive?host=***&access_id=****&access_key=****' UNTIL SCN = 1712650554000909004 PREVIEW;Specifies the original data backup path and log archive path, and the desired restore timestamp
2024-04-09 16:15:54.obclient [oceanbase]> ALTER SYSTEM RESTORE FROM 'oss://test_bucket/data?host=***&access_id=****&access_key=****, oss://test_bucket/archive?host=***&access_id=****&access_key=****' UNTIL TIME = '2024-04-09 16:15:54' PREVIEW;
NFS
Specifies the original data backup path and log archive path, and the desired restore SCN
1712650554000909004.obclient [oceanbase]> ALTER SYSTEM RESTORE FROM 'file:///ob_backup/data, file:///ob_backup/archive' UNTIL SCN = 1712650554000909004 PREVIEW;Specifies the original data backup path and log archive path, and the desired restore timestamp
2024-04-09 16:15:54.obclient [oceanbase]>ALTER SYSTEM RESTORE FROM 'file:///ob_backup/data, file:///ob_backup/archive' UNTIL TIME = '2024-04-09 16:15:54' PREVIEW;