My current mysql backup strategy is replication. I setup one or more slaves following a master. If the master failed, I still have a clean and up to date copy of the data from one of the slaves. It works without any problem. Now I started to have more master nodes to manage, each master node holds different data.
Now if I wanted to use the same backup strategy, I needed to setup at least one slave instance for each master. It's going to double the number of mysql nodes. Ideally I'm hoping to have only one server for all backups. Possible solutions I can think of are:
- To run multiple instances of mysql slaves on different ports on the same machine;
- Crontab + Rsync;
For possible solution #1, it should work, but it costs memory to running slave instances. For possible solution #2, I'm afraid when the data is being rsync'ed, the master failed, the backup might not contain a complete copy of the data. So is there any other better strategy to safely backup all master node to a single place?