cbbackupmgr
cbbackupmgr is a tool for managing the backup and restore of Couchbase-Server data.
Understanding cbbackupmgr
The cbbackupmgr tool backs up and restores data, scripts, configurations, and more.
It allows large data sets to be managed with extremely high performance.
Use of AWS S3 storage is supported.
Only Full Administrators can use cbbackupmgr; which is available in Couchbase Server Enterprise Edition only.
Note that cbbackupmgr is not backward compatible with backups created by means of cbbackup.
Planning for Disaster Recovery
Backup and restore capabilities are critical to an overall Disaster Recovery Plan, and ensuring thereby business continuity.
Administrators are therefore recommended to define plans for both Recovery Time Objective (RTO) and Recovery Point Objective (RPO), and make use of cbbackupmgr correspondingly.
Backup Repositories
All backup is stored in and recovered from a Backup Repository. In turn, a Backup Repository is stored in a Backup Archive on the filesystem. Each backup job in the Backup Repository stores its backup in two ways:
-
All bucket data is stored in a small, secondary database.
-
All bucket creation scripts and configuration files are stored on the file system, as files.
Tool Locations
The cbbackupmgr tool is installed, with all other tools, in the following per platform locations:
| Operating system | Directory locations |
|---|---|
Linux |
/opt/couchbase/bin/cbbackupmgr |
Windows |
C:\Program Files\Couchbase\Server\bin\cbbackupmgr Assumes default installation location |
Mac OS X |
/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbbackupmgr |
How the Backup and Restore Tool Works
By default, the cbbackupmgr tool performs incremental backups to back up only the new data.
However, on a new cluster and for the first time, this tool generates a full backup.
Each of the subsequent, incremental backups take a fraction of the time taken by the full backup.
Archive Repository
The backup archive is a directory that contains a set of backup repositories as well as logs for the backup client. The backup directory should be modified only by the backup client, and any modifications that are not done by that client might result in a corruption of backup data.
Only one backup client can access the backup archive at one time. If multiple instances of the backup client are running on the same archive at the same time, this might result in corruption. To prevent such corruption instances, you may be required to create multiple backup archives depending on your use case.
Version Compatibility
For all versions except 6.5, cbbackupmgr must be run on a Couchbase Server installation that has the same major and minor version as the affected cluster.
For example, to either back up data from or restore data to a cluster running Couchbase Server Version 6.6, cbbackupmgr must be run on a Couchbase Server Version 6.6 node: the node can be, but need not be, a member of the 6.6 cluster.
Note that additional options are provided for using the 6.5 version of cbbackupmgr: these are described below.
To restore a backup, the version of the Couchbase Server installation that was used to create the backup must be compatible with the version of the cluster to which data is to be restored. Details are provided in the following table:
| Restore to cluster running: | Using tool provided with: | Data previously backed up from cluster running: | ||||||
|---|---|---|---|---|---|---|---|---|
| 7.0 | 6.6 | 6.5 | 6.0 | 5.5 | 5.1 | 5.0 | ||
7.0 |
7.0* |
✓ |
✓ |
✓ |
✓ |
|||
6.6 |
6.6** |
✓ |
✓ |
✓ |
✓ |
|||
6.5 |
6.5 |
✓ |
✓ |
✓ |
||||
6.0 |
6.0 |
✓ |
||||||
5.5 |
5.5 |
✓ |
||||||
5.1 |
5.1 |
✓ |
✓ |
|||||
5.0 |
5.0 |
✓ |
||||||
* AWS S3 options can be used only when restoring from a 7.0 or a 6.6 backup. See below.
** AWS S3 options can be used only when restoring from a 6.6 backup. See below.
Additional 6.5 Options
When run on a node hosting Couchbase Server Version 6.5, cbbackupmgr can be used to back up data from a cluster running 6.5, 6.0, or 5.5.
It can also be used to restore to a cluster running 6.5, 6.0, or 5.5 any backup previously made to the data of a cluster running any of those versions; as long as the restoration meets the compatability requirements listed above, in Version Compatibility.
7.0, 6.6, and AWS S3
The versions of cbbackupmgr respectively provided with Couchbase Server Versions 7.0 and 6.6 support the use of backup and restore with storage provided by AWS S3.
The following restrictions apply:
-
The tool provided with Couchbase Server Version 7.0 can only be used to restore data backed up on Couchbase Server Versions 7.0 and 6.6.
-
The tool provided with Couchbase Server Version 6.6 can only be used to restore data backed up on Couchbase Server Version 6.6.