Purpose
The ALTER SYSTEM VALIDATE statement is used to perform physical backup validation.
Limitations and considerations
Due to the frequent access to backup media required for validation tasks, which can consume network resources intended for backup tasks, it is recommended to execute validation tasks when no backup tasks are running in the user tenant and the system is under low load.
When specifying the validation level for backup validation:
For backup sets and log archive pieces from versions earlier than V4.6.0, basic validation (file integrity check) is not supported.
For backup sets from versions earlier than V4.3.4, physical validation (checking the correctness of physical data and logical consistency) is not supported.
Privilege requirements
This statement must be executed by the administrator of each tenant. Specifically:
In MySQL mode, the default administrator is the
rootuser.In Oracle mode, the default administrator 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 | Validates all backup sets and log archive pieces in the entire backup path and archive path of the current tenant. This parameter does not support specifying a validation path (DATA_BACKUP_DEST or LOG_ARCHIVE_DEST), meaning it does not support cross-cluster or cold backup data scenarios. |
| BACKUPSET | Validates the specified backup set. If the backup_set_id is not specified, it validates all backup sets in the current backup path.
NoticeIf the |
| ARCHIVELOG_PIECE | Validates the specified log archive piece. If the piece_id is not specified, it validates all log archive pieces in the current archive path.
NoticeIf the |
| DATA_BACKUP_DEST | Optional. Specifies the data backup path to be validated. If this parameter is not specified, the system will validate the backup path configured for the current tenant.
NoticeOceanBase Database does not support specifying multiple paths in a single command. Therefore, when specifying a path and using |
| LOG_ARCHIVE_DEST | Optional. Specifies the log archive path to be validated. If this parameter is not specified, the system will validate the archive path configured for the current tenant. |
| LEVEL | Optional. Specifies the validation level. Valid values:
If this parameter is not specified, the default value is |
Examples
Validate all backup sets and log archive pieces in the entire backup path and archive path
The user tenant initiates a basic validation for all backup sets and log archive pieces in the current backup and archive paths of the tenant.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE BACKUP LEVEL = 'basic';
Validate a specified backup set or log archive piece
Validate a backup set
The user tenant initiates a basic validation for all backup sets in the current backup path of the tenant.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE BACKUPSET LEVEL = 'basic';The user tenant initiates a physical validation for backup sets with
backup_set_id1 and 2 in the current backup path of the tenant.obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE BACKUPSET = '1,2' LEVEL = 'physical';
Validate a log archive piece
The user tenant initiates a basic validation for all log archive pieces in the current archive path of the tenant.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE LEVEL = 'basic';The user tenant initiates a physical validation for log archive pieces with
piece_id1 and 2 in the current archive path of the tenant.obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE = '1,2' LEVEL = 'physical';
Validate a backup set or log archive piece in a specified path
Validate a backup set
The user tenant initiates a basic validation for all backup sets in the specified backup path of the tenant.
obclient> ALTER SYSTEM VALIDATE BACKUPSET DATA_BACKUP_DEST = 'file:///data/nfs/backup/data' LEVEL = 'basic';The user tenant initiates a physical validation for backup sets with
backup_set_id1 and 2 in the specified backup path of the tenant.obclient> ALTER SYSTEM VALIDATE BACKUPSET = '1,2' DATA_BACKUP_DEST = 'file:///data/nfs/backup/data' LEVEL = 'physical';
Validate a log archive piece
The user tenant initiates a basic validation for all log archive pieces in the specified archive path of the tenant.
obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE LOG_ARCHIVE_DEST = 'LOCATION=file:///data/nfs/backup/archive' LEVEL = 'basic';The user tenant initiates a physical validation for log archive pieces with
piece_id1 and 2 in the specified archive path of the tenant.obclient(sys@oracletenant)[SYS]> ALTER SYSTEM VALIDATE ARCHIVELOG_PIECE = '1,2' LOG_ARCHIVE_DEST = 'LOCATION=file:///data/nfs/backup/archive' LEVEL = 'physical';
