The DELETE BACKUP ALL statement is used to purge backup sets or log archive pieces from a specified path (either a data backup path or an archive path).
Limitations and considerations
When using the DELETE BACKUP ALL statement to clear backup sets or log archive pieces in a specified path:
- You can only clear the backup or archive path being replaced. You cannot clear the currently in-use backup or archive path.
- You cannot reset the path being cleared as the backup or archive path.
- After the data backup or archive path is cleared, the corresponding path information will be deleted from the CDB_OB_BACKUP_STORAGE_INFO(sys tenant) and DBA_OB_BACKUP_STORAGE_INFO(user tenant) views.
Privilege requirements
This statement must be executed by the root user of the sys tenant (root@sys) or the administrator user of a user tenant (root user).
Syntax
ALTER SYSTEM DELETE BACKUP ALL delete_backup_action [TENANT [=] tenant_name];
delete_backup_action:
DATA_BACKUP_DEST [=] 'data_backup_path'
| LOG_ARCHIVE_DEST [=] 'log_archive_path'
Parameters
Parameter |
Description |
|---|---|
| data_backup_path | Specifies the data backup path to be cleared. |
| log_archive_path | Specifies the archive path to be cleared. |
| tenant_name | Specifies the user tenant name whose path needs to be cleared. Optional. This parameter is required only when the command is executed by the system tenant. |
Examples
System tenant
Clear the data backup path.
The system tenant clears the NFS backup path
file:///data/nfs/backup/datafor themysql001tenant.obclient(root@sys)[(none)]> ALTER SYSTEM DELETE BACKUP ALL DATA_BACKUP_DEST ='file:///data/nfs/backup/data' TENANT = mysql001;Clear the archive path.
The system tenant clears the NFS archive path
file:///data/nfs/backup/archivefor tenantmysql001.obclient(root@sys)[(none)]> ALTER SYSTEM DELETE BACKUP ALL LOG_ARCHIVE_DEST ='file:///data/nfs/backup/archive' TENANT = mysql001;
User tenant
Clear the data backup path.
The user tenant clears its own NFS backup path
file:///data/nfs/backup/data.obclient> ALTER SYSTEM DELETE BACKUP ALL DATA_BACKUP_DEST ='file:///data/nfs/backup/data';Clear the archive path.
Clears the NFS archive path
file:///data/nfs/backup/archivefor the current tenant.obclient> ALTER SYSTEM DELETE BACKUP ALL LOG_ARCHIVE_DEST ='file:///data/nfs/backup/archive';