Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-47346

[tools] It could be better if cbbackupmgr backup has output as json

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: Neo, 7.0.1
    • Fix Version/s: 6.6.0
    • Component/s: tools
    • Labels:
    • Story Points:
      1

      Description

      Currently, cbbackupmgr backup and restore output result in line format. 

      It could be better if backup and restore could output in json so we could verify more information in backup and restore processes.

       

      [root@s44015 ~]# /opt/couchbase/bin/cbbackupmgr backup -a /tmp/bk/ -r bk -c localhost -u Administrator -p password 
      Backing up to '2021-07-12T11_07_33.483140304-07_00'
      Copied all data in 15.438s (Avg. 2.77MiB/Sec)                                                                                                                                                                      63288 items / 41.52MiB
      [============================================================================================================================================================================================================================== ] 100.00%| Transfer
      | --------
      | Status    | Avg Transfer Rate | Started At                        | Finished At                     | Duration |
      | Succeeded | 2.77MiB           | Mon, 12 Jul 2021 11:07:33 -0700/s | Mon, 12 Jul 2021 11:07:48 -0700 | 15.505s  || Bucket
      | ------
      | Name          | Status    | Transferred | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
      | travel-sample | Succeeded | 41.52MiB    | 3.19MiB/s         | Mon, 12 Jul 2021 11:07:35 -0700 | Mon, 12 Jul 2021 11:07:48 -0700 | 13.938s  |
      |
      | Mutations                    | Deletions                    | Expirations                  |
      | ---------                    | ---------                    | -----------                  |
      | Received | Errored | Skipped | Received | Errored | Skipped | Received | Errored | Skipped |
      | 63288    | 0       | 0       | 0        | 0       | 0       | 0        | 0       | 0       |Backup completed successfully
      [root@s44015 ~]# 
       

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

            Hide
            carlos.gonzalez Carlos Gonzalez Betancort (Inactive) added a comment -

            Thuan Nguyen Backup has JSON output it is used by the backup service. The flag is hidden but it is --json-progress <id> in this mode the backup service will print a JSON line every couple of seconds with the progress. The last line would be the equivalent to that table there. This flag can be used in backup, merge and restore. Note that you have to give an id to the json-progress, this is just used to crossreference stuff in the backup service so it does not matter much what you give it for testing purposes.

            Show
            carlos.gonzalez Carlos Gonzalez Betancort (Inactive) added a comment - Thuan Nguyen Backup has JSON output it is used by the backup service. The flag is hidden but it is --json-progress <id> in this mode the backup service will print a JSON line every couple of seconds with the progress. The last line would be the equivalent to that table there. This flag can be used in backup, merge and restore. Note that you have to give an id to the json-progress, this is just used to crossreference stuff in the backup service so it does not matter much what you give it for testing purposes.
            Hide
            carlos.gonzalez Carlos Gonzalez Betancort (Inactive) added a comment -

            Already done in MB-35185

            Show
            carlos.gonzalez Carlos Gonzalez Betancort (Inactive) added a comment - Already done in MB-35185

              People

              Assignee:
              owend Daniel Owen
              Reporter:
              thuan Thuan Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty