0

How can I backup ScyllaDB/Cassandra remotely?

With PostgreSQL I can do something like this (backup, zip, transfer):

mkdir -p tmp/backup
OUTFILE=tmp/backup/db_backup_`date +%Y-%m-%d_%H%M%S`.sql.xz
ssh xxx@THESERVER -p 22 "cd /tmp; pg_dump -U USER -Fc -C DBNAME | xz - -c" \
 | pv -r -b > ${OUTFILE}

Also restore with simple command:

xzcat ${OUTFILE} | pg_restore  --clean --if-exists --no-acl --no-owner -U USER -d DBNAME

With MySQL also simple (backup, zip, transfer):

OUTFILE=resources/backup_`date +%Y%m%d_%H%M%S`.sql.xz
ssh xxx@THESERVER "mysqldump -u USER -h 127.0.0.1 -pPASS DBNAME | xz - -c" | 
    tee ${OUTFILE} | 
    pv -ntrb 
echo ${OUTFILE}

Restore also simple:

xzcat ${OUTFILE} | mysql -u USER -pPASS DBNAME 

Both command above didn't consume any additional disk space/garbage on the server.

How to do this in ScyllaDB/Cassandra?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.