Host-based backup of VMware vSphere VMs.
Post Reply
cosmik
Enthusiast
Posts: 72
Liked: 10 times
Joined: Jan 23, 2021 10:14 am
Full Name: Michael Pappas
Contact:

Does quiescence take "clean" backups of databases on Linux hosts?

Post by cosmik »

The subject says it all (I presume that it doesn't). How would you go about to do it (say a Mysql on a linux vm) in a security-conscious manner?
david.domask
VeeaMVP
Posts: 1034
Liked: 278 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Does quiescence take "clean" backups of databases on Linux hosts?

Post by david.domask »

Hi Michael,

Best way is probably Veeam Agent for Linux as it has direct support for MySQL backups: https://helpcenter.veeam.com/docs/agent ... tml?ver=50

For a Hypervisor backup, quiescence is likely not enough to ensure consistency and you'll need to do a dump of the database with scripts. There's an example here: https://bp.veeam.com/vbr/4_Operations/O ... mysql.html

Likely, you can modify the script to read from some password file somewhere (make sure the guest processing account has permissions to access the file). Some suggestions can be found here: https://stackoverflow.com/questions/929 ... ord-prompt

But all in all, Agent for Linux is probably your most straight-forward security conscious option.
David Domask | Director: Customer Care | Veeam Technical Support
cosmik
Enthusiast
Posts: 72
Liked: 10 times
Joined: Jan 23, 2021 10:14 am
Full Name: Michael Pappas
Contact:

Re: Does quiescence take "clean" backups of databases on Linux hosts?

Post by cosmik »

It looks a bit of a hussle to setup, plus I do have virtual appliances for which I do not know the mysql/mariadb administrative account information.

More and more it feels like the way to get this right would be to have the VM shutdown, take a backup and start it afterwards. I do not have any critical systems that need maximal uptime, so this would not be a problem on my side. Can this be done with as little fuss as possible from the backup server side and if so, how?

EDIT: another alternative would be to have the database take a backup locally (in the VM itself) at a time just before the backup job. During off-hours I do not anticipate any SQL activity to take place in most cases.
Daniel2
Enthusiast
Posts: 45
Liked: 21 times
Joined: Nov 25, 2019 8:16 am
Full Name: Daniel
Contact:

Re: Does quiescence take "clean" backups of databases on Linux hosts?

Post by Daniel2 »

Quiescing requires Vmware Tools. When quiescing is enabled, it issues a sync command, forcing the operating system to flush all buffers to disk. Then vmware takes a snapshot that veeam then uses for a backup. That is all that Veeam B&R can natively do on a Linux box, without Agent.

Quiescing does not guarantee, that the MySQL database (or any other database) is backed up in a consistent state on a Linux OS.

Veeam is unable to power down VMs before a job starts, or power it on after it finishes. Pre-Run scripts would probably not work reliably, because Veeam would not know the exact moment when the VM is turned off.

You could tell your DBA's to do MySQL backups and store them locally and Veeam would be able to backup the VM including the MySQL-backup-file, which is then guaranteed to be consistent (if the MySQL-dump itself is consistent). But that would require that you as the backup Admin and the DBA's have to agree on a schedule. Sounds inconvenient.

Better alternative is to probably use the dump-script David posted and let this execute before and after the jobs runs. That way you split responsibility between you and your DBA's and you both stay independent of each other. Just tell them where they must store the script and explain when and how this is run. Then they have to make sure that the script executes successfully, otherwise the backup will be inconsistent.

Or use the agent, as david suggested. The implementation isn't as complicated as it sounds. (But I agree that it is more complex, as it should be with VBR!)
cosmik
Enthusiast
Posts: 72
Liked: 10 times
Joined: Jan 23, 2021 10:14 am
Full Name: Michael Pappas
Contact:

Re: Does quiescence take "clean" backups of databases on Linux hosts?

Post by cosmik »

I see, thank you for the explanation and guidance.
david.domask
VeeaMVP
Posts: 1034
Liked: 278 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Does quiescence take "clean" backups of databases on Linux hosts?

Post by david.domask »

Hope it helps!

I agree with most of what Daniel says, but you actually could just write a very fast Pre-Job script to use PowerCLI to shut down the machine and a post-job to power it on :) If it's many machines and you need to automate this a bit more, there are some tricks, but let's cross that when we get to it.
David Domask | Director: Customer Care | Veeam Technical Support
cosmik
Enthusiast
Posts: 72
Liked: 10 times
Joined: Jan 23, 2021 10:14 am
Full Name: Michael Pappas
Contact:

Re: Does quiescence take "clean" backups of databases on Linux hosts?

Post by cosmik »

The powercli approach sounds great (even though I have never used it :D)! Will try that, thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 70 guests