Wer hier fleißig mit liest, weiß das ich Redis schon lange repliziere. Dazu läuft halt woanders ein Slave, der im Idealfall den selben Datenstand hat wie der Master. Da hier keine finanziellen Transaktionen stattfinden, reicht mir das persönlich.
Da ich ja mit dem Umzug zu Proxmox, ein wenig mein System geändert habe, gibt es jetzt für verschiedene Aufgaben eigene VMs. So kann ich das hoffentlich besser warten. Das war zuletzt doch auf meinem überladenen Root, für mich immer schwerer geworden. Auch der Grund warum ich aufgeräumt habe. Aber, ich komme vom Thema ab 
Die Replication werde ich heute nicht mehr angehen, aber ich möchte hier schon mal festhalten was ich dann vermutlich morgen umsetzen werde.
Installation
Die Anleitung von MariaDB findet man hier.
Master
In my.cnf folgendes eintragen, danach MariaDB neustarten.
[mariadb]
log-bin
server_id=1
log-basename=master1
Neustarten
service mysql restart
Slave
Installation
apt install mariadb-server
In my.cnf
server_id=2
eintragen. Neustarten!
Binary Log Position
Nun müssen wir eine Position ermitteln. Ich kopiere dazu mal eben flott den Teil aus der Anleitung 
Now you need prevent any changes to the data while you view the binary log position. You'll use this to tell the slave at exactly which point it should start replicating from.
- On the master, flush and lock all tables by running FLUSH TABLES WITH READ LOCK. Keep this session running - exiting it will release the lock.
- Get the current position in the binary log by running SHOW MASTER STATUS:
SHOW MASTER STATUS;
+--------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+--------------------+----------+--------------+------------------+
| mariadb-bin.000096 | 568 | | |
+--------------------+----------+--------------+------------------+
-
Record the File and Position details. If binary logging has just been enabled, these will be blank.
-
Now, with the lock still in place, copy the data from the master to the slave. See Backup, Restore and Import for details on how to do this.
-
Note for live databases: You just need to make a local copy of the data, you don't need to keep the master locked until the slave has imported the data.
-
Once the data has been copied, you can release the lock on the master by running UNLOCK TABLES.
UNLOCK TABLES;
Quelle: https://mariadb.com/kb/en/library/setting-up-replication/
Datenbank sichern
Installation
apt install mariadb-backup
Mit diesem Tool sichern wir die komplette Datenbank, die DB auf dem Master ist immer noch im Status LOCKED! Damit das möglich ist, muss in der DB ein User existieren.
CREATE USER 'mariabackup'@'localhost' IDENTIFIED BY 'mypassword';
GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'mariabackup'@'localhost';
Der Befehl zum Sichern der DB sieht dann so aus.
mariabackup --backup \
--target-dir=/var/mariadb/backup/ \
--user=mariabackup --password=mypassword
Wenn ich das oben alles richtig verstanden habe, kann ich jetzt den Status LOCKED der DB auf dem Master entfernen. Die Daten sind jetzt gesichert, wir kennen die Position. Ab hier holt sich der SLAVE dann von alleine die Daten.
Quelle: https://mariadb.com/kb/en/library/mariabackup-overview/
Starten des Slave
Hier der Auszug aus der Anleitung.
Once the data has been imported, you are ready to start replicating. Begin by running a CHANGE MASTER TO, making sure that MASTER_LOG_FILE matches the file and MASTER_LOG_POS the position returned by the earlier SHOW MASTER STATUS. For example:
CHANGE MASTER TO
MASTER_HOST='master.domain.com',
MASTER_USER='replication_user',
MASTER_PASSWORD='bigs3cret',
MASTER_PORT=3306,
MASTER_LOG_FILE='mariadb-bin.000096',
MASTER_LOG_POS=568,
MASTER_CONNECT_RETRY=10;
If you are starting a slave against a fresh master that was configured for replication from the start, then you don't have to specify MASTER_LOG_FILE and MASTER_LOG_POS.
Use Global Transaction Id (GTID)
MariaDB starting with 10.0
MariaDB 10.0 introduced global transaction IDs (GTIDs) for replication. It is generally recommended to use (GTIDs) from MariaDB 10.0, as this has a number of benefits. All that is needed is to add the MASTER_USE_GTID option to the CHANGE MASTER statement, for example:
CHANGE MASTER TO MASTER_USE_GTID = slave_pos
See Global Transaction ID for a full description.
- Now start the slave with the START SLAVE command:
START SLAVE;
-
Check that the replication is working by executing the SHOW SLAVE STATUS command:
SHOW SLAVE STATUS \G
-
If replication is working correctly, both the values of Slave_IO_Running and Slave_SQL_Running should be Yes:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Eine Menge Stoff zum Ausprobieren
Liest sich aber alles logisch nachvollziehbar. Wenn es denn dann auf dem Server auch rund läuft, sollte das ja Morgen erledigt sein. Aktuell ist mir das jetzt zu spät, da sollte man auf dem Server nichts mehr schrotten 
Ich werde das hier morgen ausführlich erweitern, und berichten, wie es mir so ergangen ist.