Couchbase backup not working -cbbackup build error

I have run this command to start taking back up of CB node and getting error.

python3 cbbackup http://localhost:8091 3 /backup -u Admin -p  ****  --single-node -b default 

I ma getting this error. Some one help me into this

sh-4.2$ python3 cbbackup http://localhost:8091 /backup -u Admin -p **** --single-node -b default
  File "cbbackup", line 4
    D0="`dirname "$0"`"
                  ^
SyntaxError: invalid syntax

@SHARMG51 can you please provide more info on the CB version you are running? and also which OS platform are you at?

Hi,

CB version is Couchbase Server 6.0.4-3082 (EE) & OS details are

NAME=“Amazon Linux”
VERSION=“2”
ID=“amzn”
ID_LIKE=“centos rhel fedora”
VERSION_ID=“2”
PRETTY_NAME=“Amazon Linux 2”
ANSI_COLOR=“0;33”
CPE_NAME=“cpe:2.3:o:amazon:amazon_linux:2”
HOME_URL=“https://amazonlinux.com/

Hello @SHARMG51,

The cbbackup it is a shell wrapper script as a result calling it via python3 will not work as it’s not a python script.

The correct way to call cbbackup is directly:

$ /opt/couchbase/bin/cbbackup

For more information please see the documentation

That being said I see that you’re using the Enterprise version of Couchbase Server, for that edition we recommend using cbbackupmgr.