Comprehensive data protection for all workloads
Post Reply
lt-mini
Lurker
Posts: 2
Liked: never
Joined: Oct 29, 2014 8:11 am
Contact:

Timed out waiting for pre-freeze script to finish execution

Post by lt-mini »

Hi All,

Case # 02035663

We are making backups of MySQL database, previously we didn't added any pre-freeze/post-thaw scripts, but we noticed during a crash, you are not guaranteed to have a consistent MySQL "backup".
This way we wanted to implement pre-freeze and post-thaw scripts.

For MySQL replication, we just stop the MySQL service before the snapshot and start it again after.
But for the master database, we just want to "lock the tables". We've followed the below blog ( https://www.virtuallifestyle.nl/2013/03 ... -database/) and I must say, the scripts are working perfect.

Only we have one side note that we get "Timed out waiting for pre-freeze script to finish execution" in Veeam, even when I clearly configure an exit code.

We've opened a cased, and they informed us to increase the time-out, but I'm sure this is not the issue, as the script only takes 5-10 seconds.

So the backup is like this:
* Start pre-freeze event /Start Script A
* Script A starts a new script in the background script B
* Script A is finished withing 5-10 seconds.
* Script A sends "exit 0"
* VM Snapshot *Start Post-Thaw script
* This will stop Script B (exit 0) What Script B actually does, is keep a lock on the mysql databases, until the vm snapshot has been taken, to have a consistent mysql database backup. So actually the pre-freeze event should stop after the exit of script A.

The script runs, and locks the tables, but seems Veeam doesn't see the exit code? Or is it waiting on the background script (Script B).

I just want to check if any of you experienced the same, but doesn't need to be linked to mysql.

If you need more info just let me know.

Regards,
Glenn
Andreas Neufert
VP, Product Management
Posts: 7081
Liked: 1511 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: Timed out waiting for pre-freeze script to finish execut

Post by Andreas Neufert »

As we do not know anyting about script B we can not wait for it. If script A finish we will proceed.

Please copy the scripts to your VM and check if the run fine.
Is this Windows or Linux? If Linux make sure that you edit the script with a Editor in Unix mode so that you have correct line breaks.
Mac add \r
Unix/Linux a \n
and Windows editors add a \r\n at the end of a line.
So it happens often that you edit a linux script with windows edit and the script execution hang with a \r.
By copy it to the Server and run it, you can test if everything works as expected.
pdimarco
Veeam Software
Posts: 292
Liked: 38 times
Joined: Sep 02, 2014 7:25 am
Full Name: Pascal DiMarco
Contact:

Re: Timed out waiting for pre-freeze script to finish execut

Post by pdimarco »

Hi Glenn,

I did something quite similar (described here : https://www.veeam.com/wp-consistent-pro ... riadb.html).

I observed no issues with Veeam catching exit codes. You might face the "while" loop of your pre-freeze script not exiting for some reason.

Maybe could you try a very simple pre-freeze script, like "echo hello world > /tmp/test.out;exit 0" to start troubleshooting.

Pascal
lt-mini
Lurker
Posts: 2
Liked: never
Joined: Oct 29, 2014 8:11 am
Contact:

Re: Timed out waiting for pre-freeze script to finish execut

Post by lt-mini »

Hi Andreas,

I've noticed that in the past. So I always modify it in Linux and then copy it to the Veeam Server.
The script runs fine when I run it manually. But I know it also runs fine in Veeam, only the "exit 0" seems not to be captured.

Any possible way to get this in any veeam logs ?

@ Marco,
When I remove script B, then it works fine. So It must wait on something.

But I've read your document, and with some modifications it worked for me. Now I'm testing it on my Veeam Backup Jobs and the first runs show the result I want.
Good to know that this article exists, As I only found an older article which recommended to shutdown MySQL.

I know, it will be interesting for more people as this is the first Article which really answered all the questions about Backuping MySQL.

Thanks for this!

Regards,
Glenn
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 61 guests