What’s the best way to run a database such as Mariadb and manage backups?
- send data to external cloud storage.
- mount a custom incus volume to /var/lib/mysql
- just keep backing up the container/vm
What are the typical solutions used in production?
What’s the best way to run a database such as Mariadb and manage backups?
For a production setup I would have one master and at least one replica database configured or if you need higher availability setup a cluster. Having /var/lib/mysql on a separate storage volume is recommended as it has a few advantages compared to have a single image where everything sits on.
Having replication doesn’t mean you don’t need a backup solution.
Point I want to make is separate your data from the OS allows much better flexibility to perform upgrades, backups etc.
Hope it helps a bit