- install
mariadb-backuppackage on both servers mariadb-backup --backup --stream | ssh user@slave-host-ip 'cat > xbstream.mb'orxtrabackup --backup --stream=xbstream | ssh [email protected] 'xbstream -x -C /var/backups/mysql'with xtrabackupmbstream -x xbstream.mb -C /var/backups/mysqlmariadb-backup --prepare --target-dir /var/backups/mysqlrm -rf /var/lib/mysql/* && cp -r /var/backups/mysql/* /var/lib/mysql/chown -R mysql:mysql /var/lib/mysqlservice mysql start- use your replication user to start replication
Last active
June 11, 2021 08:11
-
-
Save danf0rth/47c2b3d2ad96b7a93a8b7dc4b2f7fd4b to your computer and use it in GitHub Desktop.
MariaDB master/slave replication
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment