Backing up incrementally

Backing up incrementally

Incremental backups are run by using the cbbackup command-line tool.

Description

The general format of the cbbackup command is:
cbbackup [options] source backup_dir 

The updated cbbackup tool adds a new option to support incremental backups. The tool still supports the existing options.

The following table describes the new backup mode option:

Option Description
-m MODE , --mode=MODE Backup mode. The mode option takes any one of the following values:
full
Perform a full backup
diff
Perform a differential incremental backup, which backs up only the changes since the last full or incremental backup.
accu
Perform a cumulative incremental backup, which backs up all changes since the last full backup.

Syntax

Basic syntax:

cbbackup -m [backup-mode] http://[host]:8091 [backup-location]

Syntax example of a full backup plus two differentials and one accumulative for a single node.


	cbbackup couchbase://HOST:8091 /backup-43 [-m full] --single-node
	cbbackup couchbase://HOST:8091 /backup-43 [-m diff] --single-node
	cbbackup couchbase://HOST:8091 /backup-43 [-m diff] --single-node
	cbbackup couchbase://HOST:8091 /backup-43 -m accu --single-node
			
Note: A full backup task is always triggered for a new sink location no matter what backup mode is specified.

Example

The following example requests a full backup of all the data on the specified cluster:

cbbackup -m full http://example.com:8091 /backups/backup-1

After an initial full backup, incremental backups can be performed. This example requests a differential incremental backup of all the data on the specified cluster:

cbbackup -m diff http://example.com:8091 /backups/backup-1

This example requests a cumulative incremental backup of all the data on the specified cluster:

cbbackup -m accu http://example.com:8091 /backups/backup-1