couchbase-cli
couchbase-cli copied to clipboard
Allow the credentials to be read in from environment variables
Read username and password from the environment variables CB_USERNAME & CB_PASSWORD as defaults when not specified on the command line.
When environment variables are used it means that credentials are not exposed in the process list which is visible to all users on the host.
Typical usage could be:
e.g. in file /etc/couchbase/credentials
CB_USERNAME=username
CB_PASSWORD=password
Followed by sourcing the credentials file and running cbbackup like so
. ./etc/couchbase/credentials cbbackup http://localhost:8091 /backups/couchbase
This addresses this problem I raised in the forums for the community edition. https://forums.couchbase.com/t/hiding-cbbackup-credentials/16894/2