Couchbase Technologies

Backup and Restore Couchbase Buckets using cbbackupmgr :

Backs up a Couchbase cluster into the backup repository specified. Before running the backup command, a backup repository must be created. See cbbackupmgr-config for more details on creating a backup repository. The backup command uses information from the previous backup taken in order to backup all new data on a Couchbase cluster. If no previous backup exists then all data on the cluster is backed up. The backup is taken based on the backup repository’s backup configuration. 

Backup Couchbase bucket(s) using cbbackupmgr:

/opt/couchbase/bin/cbbackupmgr config --archive [--archive ] --repo [--repo ] [--include-buckets ]

/opt/couchbase/bin/cbbackupmgr backup --archive [--archive ] --repo [--repo ] --host couchbase://[IP_Address] [--username ] [--password ] [--threads integer]

/opt/couchbase/bin/cbbackupmgr config --archive /u01/backup/dump/arch --repo backup_rep --include-buckets beer-sample

/opt/couchbase/bin/cbbackupmgr backup --archive /u01/backup/dump/arch --repo backup_rep --host couchbase:// --username Administrator --password 'pa$$word' --threads 4

Restore Couchbase bucket(s) using cbbackupmgr:

Restores data from the backup archive to a target Couchbase cluster. By default all data, index definitions, view definitions, full-text index definitions and bucket configuration data are restored to the cluster unless specified otherwise in the repos backup config or though command line parameters when running the restore command.

  1. Create repository on Target server side (Directory should be empty)

    Syntax: /opt/couchbase/bin/cbbackupmgr config --archive [--archive ] --repo [--repo ]
    Example: /opt/couchbase/bin/cbbackupmgr config --archive /u01/backup/dump/arch --repo backup_rep
  2. Copy the backup files from Source Server
    cp (or) scp the files from Source server to Target Server
  3. Fire the actual restore command :
    Syntax: /opt/couchbase/bin/cbbackupmgr restore --archive [--archive ] --repo [--repo ] --host couchbase://[IP_Address] [--username ] [--password ] --disable-bucket-config

    Example: /opt/couchbase/bin/cbbackupmgr restore --archive /u01/backup/dump/arch --repo backup_rep --host couchbase:// --username Administrator --password 'pa$$word' --disable-bucket-config --threads 4

Warning: --host is deprecated, use -c/--cluster

(1/1) Restoring backup 2018-11-04T02_50_44.035694632-05_00
Copied all data in 10m51.93s (Avg. 15.90MB/Sec) 22153668 items / 10.11GB
beer-sample [====================================================================================================] 100.00%

Restore completed successfully

Check all options of cbbackupmgr config, cbbackupmgr backup and cbbackupmgr restore

Want to check all commands of
cbbackupmgr, click here

Comments Rating 0 (0 reviews)

About the author


Add Comment

Click here to post a comment