View backup files
Run the following command to view completed backup tasks:
obclient> SELECT * FROM CDB_OB_BACKUP_SET_DETAILS;
Run the following command to view the expired backups based on the existing recovery window:
obclient> SELECT * FROM CDB_OB_BACKUP_SET_EXPIRED;
View backup parameters
Run the following commands to view the backup parameters:
View the backup destination
obclient> SHOW PARAMETERS LIKE '%backup_dest%';
View the backup recovery window
obclient> SHOW PARAMETERS LIKE '%recovery_window%';The recovery window can be set to xd, which indicates x days. For example, if the value is 7d, OceanBase Database stores the full backup, incremental backup, and transaction log backup data of the cluster for seven days. This ensures that the cluster can be restored to any point in time within seven days ahead of the current time.
View backup-related RootService events
Run the following command:
obclient> SELECT * FROM __all_rootservice_event_history WHERE module LIKE '%backup' OR module LIKE '%archive%' ORDER BY gmt_create DESC LIMIT 30;
View the total number of out-of-sync logs in all partitions of an OBServer
Run the following command:
obclient> SELECT sum(max_log_id-log_archive_cur_log_id) FROM __all_virtual_pg_backup_log_archive_status WHERE svr_ip="" AND svr_port=xxx;
View the backup information of a partition group (PG)
Run the following command:
obclient> SELECT * FROM __all_rootservice_event_history WHERE event LIKE '%backup%' AND value1 LIKE '%1100611139404014%';