百度智能云

All Product Document

          Data Warehouse

          SHOW-BACKUP

          SHOW BACKUP

          Description

          This statement is used to view BACKUP tasks

          SHOW BACKUP [FROM db_name];

          Description of return results:

          mysql> show backup\G
          *************************** 1. row ***************************
                         JobId: 89205228
                  SnapshotName: snapshot1
                        DbName: example_db
                         State: FINISHED
                    BackupObjs: [default_cluster:example_db.table1 (p1)]
                    CreateTime: 2020-06-14 12:08:49
          SnapshotFinishedTime: 2020-06-14 12:08:55
            UploadFinishedTime: 2020-06-14 12:10:31
                  FinishedTime: 2020-06-14 12:10:41
               UnfinishedTasks:
                      Progress:
                    TaskErrMsg:
                        Status: [OK]
                       Timeout: 86400
          1 row in set (0.06 sec)
          1. Palo only saves the latest BACKUP task.
          2. The meaning of each column is as follows:

            • JobId:unique job id.
            • SnapshotName: name of the backup.
            • DbName:database belonged to
            • State:current stage

              • PENDING:initial state after job submission.
              • SNAPSHOTING:executing snapshot.
              • UPLOAD_SNAPSHOT:snapshot completed, ready to upload.
              • UPLOADING:uploading snapshot.
              • SAVE_META:save job meta information as a local file.
              • UPLOAD_INFO:upload job meta information.
              • FINISHED:job finished successfully.
              • CANCELLED:job failed.
            • BackupObjs: tables and partitions of backup.
            • CreateTime:task submission time.
            • SnapshotFinishedTime:task submission time.
            • UploadFinishedTime:Snapshot uploading finished time.
            • FinishedTime:job finished time.
            • UnfinishedTasks:show unfinished sub-tasks id in SNAPSHOTING and UPLOADING stages.
            • Status:If the job fails, show the failure information.
            • Timeout:Timeout period of job, in seconds.

          example

          1. View the latest BACKUP task under example_db .

            SHOW BACKUP FROM example_db;

          Keywords

          SHOW, BACKUP

          最佳实践

          1. Only show the information of the latest backup operation. Historical operation information cannot be viewed.
          Previous
          SHOW-PROPERTY
          Next
          SHOW-ALTER-TABLE-MATERIALIZED-VIEW