Error when try to do backup


#1

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

command:
sh cbbackup http://127.0.0.1:8091 /backups -u admin -p password
It happend on version 4.6 on ubuntu 14.

What is wrong?


#2

HI,

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


#3

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


#4

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


#5

@anil, Could you please assist.


#6

@anil, any response?


#7

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

What should i do?


#8

try this

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

#9

I am trying now, one moment…


#10

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

Output:

Usage: cbbackup [options] source backup_dir

Online backup of a couchbase cluster or server node.

Examples:
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.

Options:
-h, --help show this help message and exit
-b BUCKET_SOURCE, --bucket-source=BUCKET_SOURCE
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
transfer
-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


Not able to take backup in Couchbase3.0?
#11

this command works for me on CB 4.6.2

/opt/couchbase/bin/cbbackup http://127.0.0.1:8091 <backup_dir>-u <admin> -p <password>

FYI
https://developer.couchbase.com/documentation/server/4.6/cli/backup-cbbackup.html


#12

may be you can try cbbackupmgr
FYI
https://developer.couchbase.com/documentation/server/4.6/backup-restore/cbbackupmgr-backup.html


#13

What is the platform you run the command?


#14

I am running the command on Ubuntu 12.04.5.


#15

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


#16

it should be a empty file directory.


#17

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

Result:
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:

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


#18

you should config archive first.then backup.
FYI

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

#19

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://127.0.0.1 --username admin --password pass

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

Error backing up cluster: Authentication error executing “GET http://127.0.0.1:8091/pools” 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?


#20

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