Error when try to do backup

“Error: please provide both a source and a backup_dir”

sh cbbackup /backups -u admin -p password
It happend on version 4.6 on ubuntu 14.

What is wrong?


I guess the syntax should be cbbackup -u admin -p password http://localhost:8091 /backups

Still same result:

sh cbbackup -u admin -p password http://localhost:8091 /backups/backup-20120501/

Error: please provide both a source and a backup_dir

@vsr1, maybe you may assist with this problem??

@anil, Could you please assist.

@anil, any response?

Any response about that? someone?
I stack for 3 days without able to do backup in ubutnu 14

What should i do?

try this

/opt/couchbase/bin/cbbackup couchbase:// -m full --single-node -b default /backups/backup-20120501/

I am trying now, one moment…

/opt/couchbase/bin/cbbackup couchbase:// -u admin -p password m full --single-node -b default /backups/backup-20120501/


Usage: cbbackup [options] source backup_dir

Online backup of a couchbase cluster or server node.

The first backup to a given directory is a full backup, any subsequent ones are incremental.
cbbackup http://HOST:8091 /backup-42

To take a differential backup after taking a full backup.
cbbackup couchbase://HOST:8091 /backup-43 -m diff

To take an accumulative backup after taking a full backup.
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.

-h, --help show this help message and exit
single bucket from source to backup
–single-node use a single server node from the source only,
not all server nodes from the entire cluster;
this single server node is defined by the source URL
-m MODE, --mode=MODE backup mode: full, diff or accu [default:diff]
-i ID, --id=ID Transfer only items that match a vbucketID
-k KEY, --key=KEY Transfer only items with keys that match a regexp
-n, --dry-run No actual transfer; just validate parameters, files,
connectivity and configurations
-u USERNAME, --username=USERNAME
REST username for source cluster or server node
-p PASSWORD, --password=PASSWORD
REST password for source cluster or server node
-s, --ssl Transfer data with SSL enabled
-t THREADS, --threads=THREADS
Number of concurrent workers threads performing the
-v, --verbose verbose logging; more -v’s provide more verbosity. Max
is -vvv
–silent Reduce logging verbosity to only include errors
-x EXTRA, --extra=EXTRA
Provide extra, uncommon config parameters;
comma-separated key=val(,key=val)* pairs

Available extra config parameters (-x):
backoff_cap=10 (Max backoff time during rebalance period);
batch_max_bytes=400000 (Transfer this # of bytes per batch);
batch_max_size=1000 (Transfer this # of documents per batch);
cbb_max_mb=100000 (Split backup file on destination cluster if it
exceeds MB); conflict_resolve=1 (By default, enable conflict
resolution.); data_only=0 (For value 1, only transfer data from a
backup file or cluster); dcp_consumer_queue_length=1000 (A DCP client
needs a queue for incoming documents/messages. A large length is more
efficient, but memory proportional to length*avg. doc size. Below
length 150, performance degrades significantly.); design_doc_only=0
(For value 1, transfer design documents only from a backup file or
cluster); flow_control=1 (For value 0, disable flow control to improve
throughput); max_retry=10 (Max number of sequential retries if
transfer fails); mcd_compatible=1 (For value 0, display extended
fields for stdout output.); nmv_retry=1 (0 or 1, where 1 retries
transfer after a NOT_MY_VBUCKET message); recv_min_bytes=4096 (Amount
of bytes for every TCP/IP call transferred); rehash=0 (For value 1,
rehash the partition id’s of each item; this is needed when
transferring data between clusters with different number of
partitions, such as when transferring data from an OSX server to a
non-OSX cluster); report=5 (Number batches transferred before updating
progress bar in console); report_full=2000 (Number batches transferred
before emitting progress information in console); seqno=0 (By default,
start seqno from beginning.); try_xwm=1 (Transfer documents with
metadata. 0 should only be used if you transfer from 1.8.x to 1.8.x);
uncompress=0 (For value 1, restore data in uncompressed mode)

Error: please provide both a source and a backup_dir

this command works for me on CB 4.6.2

/opt/couchbase/bin/cbbackup <backup_dir>-u <admin> -p <password>


may be you can try cbbackupmgr

What is the platform you run the command?

I am running the command on Ubuntu 12.04.5.

I tried also using this command, but i get error in the --archive <archive_dir> parameter, i do not know how to define it.

it should be a empty file directory.

If i add archive folder:
/opt/couchbase/bin/cbbackupmgr backup --archive /data/backups --repo selfiecash --cluster couchbase:// --username admin --password roySabahpick2017ls

Error backing up cluster: Error opening archive at /data/backups due to Not an archive directory

If i do the same command without archive folder:

Flag required, but not specified: -a/–archive

you should config archive first.then backup.

/opt/couchbase/bin/cbbackupmgr config --archive /tmp/backup --repo selfiecash
/opt/couchbase/bin/cbbackupmgr backup --archive /tmp/backup --repo selfiecash -c couchbase:// --username admin --password password
1 Like

Thank you @atom_yang, but it looks like when i click enter id duplicate the lines some how and maybe because of that i have problem:

The command:
/opt/couchbase/bin/cbbackupmgr backup --archive /tmp/backup --repo selfiecash -c couchbase:// --username admin --password pass

/opt/couchbase/bin/cbbackupmgr backup --archive /tmp/backup --repo selfiecash -c couchbase:// --username admin --password pas
/couchbase/bin/cbbackupmgr backup --archive /tmp/backup --repo selfiecash -c couchbase:// --username admin --password pass{clear}

Error backing up cluster: Authentication error executing “GET” check username and password

( {clear} was the last command i type before i send the command. )

The password i typed is the correct one, but beacuse of the duplicate lines he think that this is not the correct password.
How can i stop the duplicate lines and why does it happen?

Ok i found what happend to duplicate… in my password i have twice !! and this is make the problem,
What should i do?