-
- Influencer
- Posts: 14
- Liked: 1 time
- Joined: Aug 20, 2021 11:07 am
- Full Name: Sebastian
- Contact:
MySQL Snapshot Backup
Hello all,
We are currently testing Veeam Backup & Replication (V11) and are dealing with the issue of MySQL backups at the moment.
I am currently looking for a reasonable solution to backup our MySQL instances consistently.
Some info:
- various virtual Linux machines (CentOS on VMware)
- MySQL 5.7 (Myisam)
We can't shutdown MySQL. So this falls away.
My initial idea was to first run a post script which applies a "write lock" to all tables, then the snapshot is taken and then an "unlock" via pre script is done. But of course this doesn't work, because the LOCK is only valid as long as the MySQL session in which it was set is active.
We would not like to use mysqldump. Then we have the data 1x in the snapshot and 1x additionally in a dump file. We can't exclude MySQL in the snapshot either.
So my question:
Is there a way with Veeam VMware snapshot backups to get consistent MySQL backups without shutting down MySQL or using mysqldump?
Many greetings
Sebastian
We are currently testing Veeam Backup & Replication (V11) and are dealing with the issue of MySQL backups at the moment.
I am currently looking for a reasonable solution to backup our MySQL instances consistently.
Some info:
- various virtual Linux machines (CentOS on VMware)
- MySQL 5.7 (Myisam)
We can't shutdown MySQL. So this falls away.
My initial idea was to first run a post script which applies a "write lock" to all tables, then the snapshot is taken and then an "unlock" via pre script is done. But of course this doesn't work, because the LOCK is only valid as long as the MySQL session in which it was set is active.
We would not like to use mysqldump. Then we have the data 1x in the snapshot and 1x additionally in a dump file. We can't exclude MySQL in the snapshot either.
So my question:
Is there a way with Veeam VMware snapshot backups to get consistent MySQL backups without shutting down MySQL or using mysqldump?
Many greetings
Sebastian
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: MySQL Snapshot Backup with Veeam B&R 11
You can use the veeam agent for Linux todo the mysql backup.
It won‘t use another license. The same license is used for vmimage and agent backup on the same vmware host.
https://helpcenter.veeam.com/docs/agent ... tml?ver=50
It won‘t use another license. The same license is used for vmimage and agent backup on the same vmware host.
https://helpcenter.veeam.com/docs/agent ... tml?ver=50
Product Management Analyst @ Veeam Software
-
- Influencer
- Posts: 14
- Liked: 1 time
- Joined: Aug 20, 2021 11:07 am
- Full Name: Sebastian
- Contact:
Re: MySQL Snapshot Backup with Veeam B&R 11
so i would only use the agent backup for those servers instead of a snapshot backup (since i dont want to have a snapshot and a separate mysql backup) and create Full/Inc Backups?
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: MySQL Snapshot Backup with Veeam B&R 11
Yes, that will work.
There are some limitations you have to check. If you don't face them, it will work.
For DR, you should test Agent to VmWare Restore after the initial backup.
Or test the restore with the recovery iso.
There are some limitations you have to check. If you don't face them, it will work.
For DR, you should test Agent to VmWare Restore after the initial backup.
Or test the restore with the recovery iso.
Requirements and Limitations for MySQL Processing
- Veeam Agent for Linux supports processing of MySQL database system version 5.6 — 8.0.
- Configurations with multiple MySQL installations and/or instances on the same machine are not supported.
- MySQL Cluster versions are not supported.
Product Management Analyst @ Veeam Software
-
- Veeam Software
- Posts: 3626
- Liked: 608 times
- Joined: Aug 28, 2013 8:23 am
- Full Name: Petr Makarov
- Location: Prague, Czech Republic
- Contact:
Re: MySQL Snapshot Backup with Veeam B&R 11
Hello,
One more option might be the usage of pre-freeze/post-thaw scripts to process VM at the level of vSphere. There are some examples for MySQL on VeeamHub. Nevertheless, from my point of view it's better to stick with Fabian's suggestion.
Thanks!
One more option might be the usage of pre-freeze/post-thaw scripts to process VM at the level of vSphere. There are some examples for MySQL on VeeamHub. Nevertheless, from my point of view it's better to stick with Fabian's suggestion.
Thanks!
-
- Novice
- Posts: 3
- Liked: never
- Joined: Jul 08, 2024 12:22 pm
- Full Name: elyes zaag
- Contact:
MySQL Backup
Thank you for the response!
To clarify, our database engine is MySQL, not Microsoft SQL Server. We are specifically looking to back up directories containing MySQL database dumps stored in /var/backup/ on our virtual machines.
Gven this, do we still need to install the Veeam agent on each VM to back up these directories, or is there another recommended method for this scenario?
Thank you again for your assistance!
To clarify, our database engine is MySQL, not Microsoft SQL Server. We are specifically looking to back up directories containing MySQL database dumps stored in /var/backup/ on our virtual machines.
Gven this, do we still need to install the Veeam agent on each VM to back up these directories, or is there another recommended method for this scenario?
Thank you again for your assistance!
-
- Veeam Software
- Posts: 3626
- Liked: 608 times
- Joined: Aug 28, 2013 8:23 am
- Full Name: Petr Makarov
- Location: Prague, Czech Republic
- Contact:
Re: MySQL Snapshot Backup
Hello,
I moved your last post from this topic to the already existing topic related to MySQL.
In general, there are 3 available options:
1. Protect your MySQL workloads using Veeam Agent for Linux:
a) Create a backup job in Veeam B&R and specify MySQL processing settings. The installation of the agent on each VM will be performed automatically during the creation of the Protection Group
b) Back up with VAL in standalone mode
2. Create a backup job for virtual machines as per the instructions from my previous post and leverage pre-freeze/post-thaw scripts to bring the database into a consistent state prior to snapshot creation. You can find examples on VeeamHub or in this white paper
3. If you're using native MySQL tools for backup and only want to back up dumps, you can create a job for virtual machines to back up all VM disks including MySQL dumps as per the instructions from my previous post and enable VMware Tools quiescence (if you are using VMware virtualization)
I suggest sticking with option 1 - a). Using any of the methods above, you'll have all dumps in the backup anyway, but 1-a) is the most robust.
Thanks!
I moved your last post from this topic to the already existing topic related to MySQL.
In general, there are 3 available options:
1. Protect your MySQL workloads using Veeam Agent for Linux:
a) Create a backup job in Veeam B&R and specify MySQL processing settings. The installation of the agent on each VM will be performed automatically during the creation of the Protection Group
b) Back up with VAL in standalone mode
2. Create a backup job for virtual machines as per the instructions from my previous post and leverage pre-freeze/post-thaw scripts to bring the database into a consistent state prior to snapshot creation. You can find examples on VeeamHub or in this white paper
3. If you're using native MySQL tools for backup and only want to back up dumps, you can create a job for virtual machines to back up all VM disks including MySQL dumps as per the instructions from my previous post and enable VMware Tools quiescence (if you are using VMware virtualization)
I suggest sticking with option 1 - a). Using any of the methods above, you'll have all dumps in the backup anyway, but 1-a) is the most robust.
Thanks!
Who is online
Users browsing this forum: Semrush [Bot] and 37 guests