cbbackupmgr list

cbbackupmgr list

cbbackupmgr-list - Lists the contents of the backup archive.

Synopsis

cbbackupmgr list [--archive <archive_dir>] [--repo <repo_name>] [--backup <bucket_list>] [--bucket <bucket>]

Description

Lists the contents of the backup archive. The size in bytes and number of items is listed for each backup file. For each directory the cumulative size of all data contained in that directory is listed. The flags for this command are used to see various sections of the backup archive.

Options

Below are the required and optional parameters for the list command. Required

--archive <archive_dir>

  • The location of the backup archive to list.
Optional

--repo <repo_name>

  • If specified, the list command only lists the contents of this backup repository.

--backup <backup>

  • If specified, the list command only lists the contents of this backup. The --repo flag must also be specified if this flag is used.

--bucket <bucket>

  • If specified, the list command only lists the contents of this bucket. The --repo and --backup flags must also be specified if this flag is used.

Examples

The list command displays the contents of the backup archive. Consider the example of a backup archive that has two backup repositories, example1 and example2. The example1 backup repository contains one backup and the example2 repository contains two backups. The example below shows how to list the entire backup archive. The output for this operation can be large if there are a lot of backups in the backup archive.

$ cbbackupmgr list --archive /tmp/backup 
 
Size      Items          Name 
305.58MB  -              / 
51.02MB   -              + example1 
51.02MB   -                  + 2016-03-03T11_50_36.699703253-08_00 
51.02MB   -                      + gamesim-sample 
301B      0                          bucket-config.json 
51.02MB   586                        + data 
51.02MB   586                            shard_0.fdb 
2B        0                          full-text.json 
252B      0                          gsi.json 
501B      1                          views.json 
254.56MB  -              + example2 
154.44MB  -                  + 2016-03-03T11_48_41.773621864-08_00 
55.76MB   -                      + beer-sample 
298B      0                          bucket-config.json 
55.75MB   7303                       + data 
55.75MB   7303                           shard_0.fdb 
2B        0                          full-text.json 
9.99KB    8                          gsi.json 
784B      1                          views.json 
98.69MB   -                      + travel-sample 
300B      0                          bucket-config.json 
98.68MB   31591                      + data 
98.68MB   31591                          shard_0.fdb 
2B        0                          full-text.json 
9.99KB    8                          gsi.json 
1.72KB    1                          views.json 
100.12MB  -                  + 2016-03-03T11_50_01.863827072-08_00 
50.06MB   -                      + beer-sample 
298B      0                          bucket-config.json 
50.05MB   5                          + data 
50.05MB   5                              shard_0.fdb 
2B        0                          full-text.json 
9.99KB    8                          gsi.json 
784B      1                          views.json 
50.06MB   -                      + travel-sample 
300B      0                          bucket-config.json 
50.05MB   5                          + data 
50.05MB   5                              shard_0.fdb 
2B        0                          full-text.json 
9.99KB    8                          gsi.json 
1.72KB    1                          views.json 
 

From the output you can see the entire contents of the backup archive and even more importantly you can see the sizes of the backups and the amount of items backed up. The data folder contains the data files and lists the size of those files and the number of documents that were backed up. The data is kept in shard files. In this example there is only one shard file, but depending on the way the backup is taken, there may be more of these. In the full-text.json, views.json, and gsi.json files the item counts refer to the number of index definitions backed up.

Since the output for listing the entire backup archive can be long, the list command provides ways to look only at specific portions of the backup archive. For example, if you only want to see the example1 backup repository, you can do the following:

$ cbbackupmgr list --archive /tmp/backup --repo example1 
 
Size      Items          Name 
51.02MB   -              + example1 
51.02MB   -                  + 2016-03-03T11_50_36.699703253-08_00 
51.02MB   -                      + gamesim-sample 
301B      0                          bucket-config.json 
51.02MB   586                        + data 
51.02MB   586                            shard_0.fdb 
2B        0                          full-text.json 
252B      0                          gsi.json 
501B      1                          views.json 

The results can further be filtered in order to look at a specific bucket in a specific backup. To see the travel-sample bucket in the backup taken at 2016-03-03T11_50_01.863827072-08_00 from the example2 backup repository, run the list command as follows:

$ cbbackupmgr list --archive /tmp/backup --repo example2 \ 
--backup 2016-03-03T11_50_01.863827072-08_00 --bucket travel-sample 
 
Size      Items          Name 
50.06MB   -              + travel-sample 
300B      0                  bucket-config.json 
50.05MB   5                  + data 
50.05MB   5                      shard_0.fdb 
2B        0                  full-text.json 
9.99KB    8                  gsi.json 
1.72KB    1                  views.json 

Discussion

The list command is mainly used to explore your data and understand what your backup structure looks like. This alleviates the need for users to traverse the folder structure manually to infer information about their data.

Environment And Configuration Variables

(None)