cbbackupmgr

cbbackupmgr

cbbackupmgr is a tool for backing up and restoring a Couchbase cluster.

Synopsis

cbbackupmgr [--version] [--help] <command> [<args>]

Description

cbbackupmgr is a high performance backup and restore client for Couchbase Server.

See Enterprise Backup Tutorial to get started. For information on how specific commands work you can run:
cbbackupmgr <command> --help
For backup strategies see Enterprise Backup Strategies.

Options

--version

  • Prints the cbbackupmgr suite version that the cbbackupmgr program came from.

--help

  • Prints the synopsis and a list of commands. If a cbbackupmgr command is named, this option brings up the manual page for that command.

cbbackupmgr Commands

cbbackupmgr backup

  • Backs up data from a Couchbase cluster.

cbbackupmgr compact

  • Compacts a backup.

cbbackupmgr config

  • Creates a new backup repository.

cbbackupmgr list

  • Lists backups in the archive.

cbbackupmgr merge

  • Merges backups together.

cbbackupmgr remove

  • Deletes a backup repository.

cbbackupmgr restore

  • Restores a backup from the archive.

Identifier Terminology

<archive>

  • The root directory containing multiple backup repositories. This is the top-level backup directory and contains all backup data as well as backup logs.

<repository>

  • Contains a backup configuration used for taking actual backups. A repository should be created for a specific Couchbase cluster and it will contain multiple incremental backups.

<backup>

  • A backup of a Couchbase cluster at a given point in time. All backups are incremental backups.

<bucket>

  • A backup may consist of one or more buckets. Each bucket is stored separately.

File/Directory Structure

Please see the Enterprise Backup Archive Layout document.

Environment Variables

(None)

Discussion

The cbbackupmgr command is used for backing up Couchbase clusters, managing those backups, and restoring them.

The cbbackupmgr command was built around the concept of taking only incremental backups. This concept is important because as the data in a cluster grows it becomes increasingly difficult to take full backups in a reasonable amount of time. By taking incremental backups we are able to reduce the time it takes to backup a cluster by ensuring that we transfer the smallest amount of data possible each time we back the cluster up.

A consequence of taking incremental backups is that we must know about the previous backups that we have taken in order to know where we left off. This means that the cbbackupmgr command must manage the backups it has taken. The cbbackupmgr command does this by using the concept of a backup archive and a backup repository. A backup repository is a directory that contains a backup configuration for backing up a specific cluster. Normally there will be one backup repository per Couchbase cluster. Each time you want to back up this cluster you will specify this backup repository with the cbbackupmgr-backup command and the backup tool will automatically find where the last backup finished and incrementally backup new data in that cluster.

The backup archive is the top-level directory and contains one or more backup repositories and a logs folder. Logging for all backup repositories is contained in the logs folder in the backup.log file. For more information on the backup archive structure see Enterprise Backup Archive Layout.

In an incremental approach the amount of data being stored in the backup archive is always increasing. To handle this issue the backup command allows backups to be merged together. This allows data to be de-duplicated resulting in a single backup that takes up less disk space than the multiple previous backups. More information about how to take advantage of incremental backups and merges is contained in Enterprise Backup Strategies.