If you don’t have syslog in mysql, you can just do a straight mysqldump and back that up, much easier.
If you do have syslog in MySQL, you probably want to do a selective dump excluding the syslog table, and just dump the syslog table schema.
Adam.
From: observium observium-bounces@observium.org On Behalf Of Michael Kelly via observium Sent: 01 March 2021 18:19 To: observium@observium.org Cc: Michael Kelly michael@swiftserve.com Subject: [Observium] Backup options for the MySQL database
Hi Everybody,
I recently started a new role at a company that uses Observium to monitor a fairly large estate.
Observium (Professional edition) was originally installed on an EC2 instance running Debian 8 and MySQL 5.5 by someone who has long since departed the company.
My task is to bring it all up to date and document it.
I've created a new instance running Ubuntu 20.04 LTS and MySQL 8.0.23 and testing the migration process hasn't thrown up any problems.
One of the things my predecessor didn't do was to set up any backup regime for the database.
As it happens, /var/lib/mysql is a logical volume and I've been looking at using lvm snapshots as part of a backup process.
The basic idea would be to:
Connect to the mysql daemon and issue a 'FLUSH TABLES WITH READ LOCK' command.
Create the LVM snapshot.
Connect to the daemon and issue a 'UNLOCK TABLES' command.
Do something with the snapshot.
My questions are:
Is this a good idea?
Will it give me a consistent backup?
Is there a better way?
Thanks in advance,
Michael.