0

In other words; I'm trying to figure out how to restore multiple mariabackup dumps to one server (different databases). I assume I'm missing something obvious in the documentation, but I've been looking for months with no luck.

I have a number of different databases (different schema names) on a number of different servers. I would like to have all these databases replicated to one server, for various reasons. All the databases have replication set up and working already (each have one master and several replicas), that's no issue. It's "just" the part where I want to add an extra server, which should replicate all schemas, that's causing me headache.

I know how to create such a replica by using mysqldump and importing each db individually. But in this case, all databases are far too large for mysqldump, so I (believe I) need to use mariabackup. But I simply can't figure out how to import multiple dumps into one server instance.

Again; I'm sure I'm missing something obvious. Any hint will be greatly appreciated :)

I know it's not that simple, but all I want for christmas is the ability to set up a blank server, and tell it to "replicate this schema from that server", after which the server should "just" stream the entire database from the other server - redis style :P

dbdemon
  • 6,964
  • 4
  • 21
  • 40
Vonsild
  • 101
  • 2

1 Answers1

0

If you want an actual replication solution for this, then you can use multi-source replication. See the MariaDB documentation and this MariaDB blog article for details and examples.

As for using mariabackup as part of this, I suppose it could make sense for the initial provisioning of the server. I don't have experience with restoring multiple such backups to one MariaDB server, but I think it can be done. You may want to perform partial mariabackups of the source databases (so you exclude the system schemas/tables), and then restoring can possibly be done one backup at a time, either with mariabackup's --copy-back option or by manually copying the table files.

You probably don't want to use mariabackup as a full-time replication solution, amongst other reasons because it does briefly lock your database while the backup is running.

dbdemon
  • 6,964
  • 4
  • 21
  • 40