- install
mariadb-backup
package on both servers mariadb-backup --backup --stream | ssh user@slave-host-ip 'cat > xbstream.mb'
orxtrabackup --backup --stream=xbstream | ssh root@1.2.3.4 'xbstream -x -C /var/backups/mysql'
with xtrabackupmbstream -x xbstream.mb -C /var/backups/mysql
mariadb-backup --prepare --target-dir /var/backups/mysql
rm -rf /var/lib/mysql/* && cp -r /var/backups/mysql/* /var/lib/mysql/
chown -R mysql:mysql /var/lib/mysql
service 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