cbbackupmgr config
Creates and configures a new backup repository
SYNOPSIS
cbbackupmgr config [--archive <archive_dir>] [--repo <repo_name>] [--exclude-buckets <bucket_list>] [--include-buckets <bucket_list>] [--disable-bucket-config] [--disable-views] [--disable-gsi-indexes] [--disable-ft-indexes] [--disable-data]
DESCRIPTION
Creates a new backup repository with a new backup configuration. The configuration created is used for all backups in this backup repository.
By default a backup configuration is created that will backup all buckets in the cluster. Each bucket will have its bucket configuration, views definitions, gsi index definitions, full-text index definitions, and data backed up. Specifying various flags, the config command can modify the configuration to backup a subset of the data.
Once a backup repository is created its configuration cannot be changed.
OPTIONS
Below are a list of required and optional parameters for the config command.
Required
- -a,--archive <archive_dir>
-
The directory where the new backup repository will be created. If it does not already exist, an attempt will be made to create it.
- -r,--repo <repo_name>
-
The name of the new backup repository.
Optional
- --exclude-buckets <bucket_list>
-
Modifies the repository configuration to back up all buckets not specified in <bucket_list>. This flag cannot be specified at the same time as the --include-buckets flag. Takes a comma separated list of bucket names.
- --include-buckets <bucket_list>
-
Modifies the repository configuration to only back up the buckets specified in <bucket-list>. This flag cannot be specified at the same time as the --exclude-buckets flag. Takes a comma separated list of bucket names.
- --disable-views
-
Modifies the repository configuration to disable backing up view definitions for all buckets.
- --disable-gsi-indexes
-
Modifies the repository configuration to disable backing up gsi index definitions for all buckets.
- --disable-ft-indexes
-
Modifies the repository configuration to disable backing up full-text index definitions for all buckets.
- --disable-data
-
Modifies the repository configuration to disable backing up all key-value data for all buckets.
EXAMPLES
The config command is used to create a backup repository and define the repositories backup configuration. In the examples below, the backup archive is located at /data/backups. Since this is the first backup repository we are creating in a new backup archive, we need to ensure that /data/backups is an empty directory. Archives are created automatically if an archive doesn’t already exist at the archive path, but are only created if the directory at that path is empty. In order to create a backup repository called "example" with the default configuration use the following command:
$ cbbackupmgr config -a /data/backups -r example
Upon creation of a new backup repository there will be a new directory in the backup archive containing a backup configuration. You can see this new directory using the cbbackupmgr-list[1] command.
$ cbbackupmgr list -a /data/backups Size Items Name 0B - + example
Using the optional parameters of the create command, you can modify the backup configuration settings. To create a backup repository with a backup configuration that only backs up the buckets "airline_data" and "ticket_prices" and does not back up up bucket configuration data, you can run the following:
$ cbbackupmgr config -a /data/backups -r example \ --include-buckets airline_data,ticket_prices --disable-bucket-config
To create a backup repository with a backup configuration that backs up only data on all buckets, you can run the following command:
$ cbbackupmgr config -a /data/backups -r example --disable-bucket-config \ --disable-views --disable-gsi-indexes --disable-ft-indexes
DISCUSSION
Though not required, it is recommended that there is a single backup repository per cluster. Backup repositories are managed so that all backups can be taken incrementally and merged together as backup data ages. Backing up in this manner allows backups to transfer the least amount of data necessary which reduces back up time and cluster resource usage. For more details on backup strategies see cbbackupmgr-strategies[7].
When a backup repository is created, it should only be modified by the cbbackupmgr utility. Any modifications done outside of this utility can cause corruption of backup files.
ENVIRONMENT AND CONFIGURATION VARIABLES
- CB_ARCHIVE_PATH
-
Specifies the path to the backup archive. If the archive path is supplied as a command line argument then this value is overridden.
FILES
- backup-meta.json
-
The config command creates a backup configuration file in the backup repository called backup-meta.json. This file contains the backup configuration for all backups run in the backup repository it was created in. It should never be modified and treated as a read-only file.
CBBACKUPMGR
Part of the cbbackupmgr suite