Purpose
The ALTER SYSTEM VALIDATE statement is used to perform physical backup verification.
Limitations and considerations
For V4.4.2, the
ALTER SYSTEM VALIDATEstatement is supported starting from V4.4.2 BP2.Since verification tasks frequently access backup media to read data, thereby competing for network resources with backup tasks, it is recommended to run verification tasks when the user tenant has not initiated any backup tasks and the system load is low.
When specifying the verification level for backup verification:
For version V4.4.2, backup sets and log archive pieces prior to V4.4.2 BP2 do not support basic verification, meaning file integrity verification is not supported.
For backup sets earlier than V4.3.4, physical verification is not supported, meaning the correctness of physical data and logical consistency verification are not supported.
Privilege requirements
This operation must be performed by the administrator user of each tenant. Specifically:
The default administrator user in MySQL-compatible mode is the
rootuser.The default administrator user in Oracle-compatible mode is the
SYSuser.
Syntax
ALTER SYSTEM VALIDATE { BACKUP | BACKUPSET [= 'backup_set_id_list'] | ARCHIVELOG_PIECE [= 'piece_id_list'] }
[ DATA_BACKUP_DEST = 'data_backup_path' ]
[ LOG_ARCHIVE_DEST = 'log_archive_path' ]
[ LEVEL = { 'basic' | 'physical' } ];
backup_set_id_list:
backup_set_id[,backup_set_id,...]
piece_id_list:
piece_id[,piece_id,...]
Parameters
Parameter |
Description |
|---|---|
| BACKUP | Verify all backup sets and log archive pieces under the entire backup path and archive path in the current user tenant. Specifying a verification path is not supported.DATA_BACKUP_DESTorLOG_ARCHIVE_DEST), which means it does not support cross-cluster or cold standby scenarios. |
| BACKUPSET | Verify the specified backup set. If the backup set is not specified,backup_set_id, then all backup sets under the current backup path will be verified.
NoteIf you do not specify |
| ARCHIVELOG_PIECE | Verify the specified log archive piece. If the archive piece is not specified,piece_id, then verify all log archive pieces in the current archive path.
NoteIf you do not specify |
| DATA_BACKUP_DEST | Optional. Specifies the backup path of the data to be verified. If this parameter is not specified, the backup path configured for the current tenant backup is verified by default.
NoticeOceanBase Database does not support specifying multiple paths in a single command. Therefore, when verifying an incremental backup set under a specified path by specifying the |
| LOG_ARCHIVE_DEST | Optional. Specifies the log archive path to be verified. If this parameter is not specified, the system will verify the archive path configured for the current tenant by default. |
| LEVEL | Specifies the verification level. Valid values:
If this parameter is not specified, the default value is |
Examples
Verify all backup sets and log archive pieces under the entire backup path and archive path
The user tenant initiates a basic verification for all backup sets and archive pieces under the current backup and archive paths.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE BACKUP LEVEL = 'basic';
Verify a specified backup set or log archive piece
Verify the backup set
The user tenant initiates a basic verification for all backup sets under the current backup path of this tenant.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE BACKUPSET LEVEL = 'basic';The user tenant initiates a physical verification for the backup sets with
backup_set_id1 and 2 under the current backup path of this tenant.obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE BACKUPSET = '1,2' LEVEL = 'physical';
Verify log archive pieces
The user tenant initiates a basic verification for all archive pieces of the current tenant under the current archive path.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE LEVEL = 'basic';The user tenant initiates a physical verification for the log archive pieces with
piece_id1 and 2 under the current archive path.obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE = '1,2' LEVEL = 'physical';
Verify backup sets or log archive pieces in a specified path
Verify the backup set
The user tenant initiates a basic verification for all backup sets under the specified backup path of this tenant.
obclient> ALTER SYSTEM VALIDATE BACKUPSET DATA_BACKUP_DEST = 'file:///data/nfs/backup/data' LEVEL = 'basic';A user tenant initiates a physical verification for backup sets with
backup_set_id1 or 2 under the specified backup path of this tenant.obclient> ALTER SYSTEM VALIDATE BACKUPSET = '1,2' DATA_BACKUP_DEST = 'file:///data/nfs/backup/data' LEVEL = 'physical';
Verify log archive pieces
The user tenant initiates a basic verification for all archived pieces under the specified archive path.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE LOG_ARCHIVE_DEST = 'LOCATION=file:///data/nfs/backup/archive' LEVEL = 'basic';A user tenant initiates a physical verification for the log archive pieces with
piece_id1 and 2 of its own tenant under the specified archive path.obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE = '1,2' LOG_ARCHIVE_DEST = 'LOCATION=file:///data/nfs/backup/archive' LEVEL = 'physical';
