You can take a backup of a running Couchbase node. The cbbackup copies the data in the data files, but the backup process must be performed on each bucket and on all nodes of a cluster to take a backup of that cluster. The command does not backup all the data automatically.
The cbbackup script takes the following arguments:
cbbackup [bucket_path_name] [dest_dir_path]
The cbbackup tool is located within the standard Couchbase command-line directory. See Chapter 7, Command-line Interface for Administration.
Make sure that there is enough disk space to accommodate the backup. You will need at least as much storage space as currently used by the node for storing Couchbase data.
The user running the cbbackup command must have the correct permissions to read/write to the files being backed up, and run the necessary additional commands that are executed during the process.
Recommended best practice is to run the command as the
couchbase user, as this is the default
owner of the files when Couchbase Server is installed.
The cbbackup script will also perform a vacuum of the database files to defragment them which provides faster startup times. Depending on the amount of data, this script can take an extended amount of time to run. It is a best practice to make sure that your connection to the server running the script is not broken.
shell> cbbackup /opt/couchbase/var/lib/couchbase/data/default-data/default /backups/2010-12-22/
Backup the configuration file located at:
Start a powershell session.
Set the execution policy for the session:
shell> set-executionpolicy remotesigned
Run the backup
shell> cbbackup "C:\Program Files\Couchbase\Server\var\lib\couchbase\data\default-data\default" \ "C:/backup/2010-12-22/"
Copy the configuration file
config.dat file located at