Skip to content

Instantly share code, notes, and snippets.

@ramingar
Created December 10, 2024 18:46
Show Gist options
  • Save ramingar/8f1d27c4e2301aa8e77a330807da0465 to your computer and use it in GitHub Desktop.
Save ramingar/8f1d27c4e2301aa8e77a330807da0465 to your computer and use it in GitHub Desktop.
Make a backup from a remote server with Percona XtraBackup #percona #xtrabackup #remote #command
nc -l 9999 > /home/user/backups/backup.xbstream &) && ssh user@db_host_ip "(xtrabackup --backup --stream --user=dbuser --password=dbpass &) | nc -N dest_host_ip 9999"

xbstream -x < backup.xbstream

NOTE: user must to be in mysql group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment