Pull Couchbase database over ssh from remote server

0

I am working on a Debian environment and I have to pull a Couchbase database from a remote server location into my local Dev environment.

I wasn't able to find any kind of details on this topic so any kind of assistance would be greatly appreciated.

Thank you!

Ionut

Posted 2014-06-09T16:15:09.277

Reputation: 115

What do you mean by pull? Is it pull the database over? cbbackup/cbrestore is one option, and cbtransfer and the built in XDCR. The former is better for one-time setup. – Matt Ingenthron – 2014-06-11T15:19:55.963

Answers

1

The usual trick is using scp. The usual is:

scp user@remotemachine:/path/to/remote/file.db /path/to/local/dir/

You may be able to use a password, or SSH (scp runs under ssh) may be configured to require a Keyfile to log in. Try the copy, see if your password can work.

There is a simple tutorial here.

Rich Homolka

Posted 2014-06-09T16:15:09.277

Reputation: 27 121

1

There are two tools depending on the version of Couchbase you use:

cbbackupmgr:

  • Full backup

    Create repo:

    cbbackupmgr config -a "backups_directory" -r "backup_name"

    Create backup:

    cbbackupmgr backup -a "backups_directory" -r "backup_name" -c couchbase://"ip_date_node" -u "user" -p "password"

  • Restore (the bucket must be empty):

    cbbackupmgr restore -a "backups_directory" -r "backup_name" -c couchbase://"ip_date_node" -u "user" -p "pass"

cbbackup and cbrestore:

  • Backup:

    cbbackup couchbase://"ip_date_node":8091 "backup_name" -u "user" -p "pass"

  • Restore (the bucket must be empty):

    cbrestore ~/backup couchbase://ip_date_node:8091 -b "backup_name"

More info: https://docs.couchbase.com/server/current/backup-restore/backup-restore.html

ldelmoral

Posted 2014-06-09T16:15:09.277

Reputation: 11