Pre-freeze & Post-thaw Scripts [Linux]

Availability for the Always-On Enterprise

Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby jessethomas » Fri Jul 10, 2015 6:21 pm 3 people like this post

I wanted to post this here in case anyone else can benefit from my experience.

We recently began doing Veeam backups/replicas of a Red Hat 6 server that requires freeze/thaw scripts because of a database application that it hosts.

We created the scripts referencing the documentation (http://helpcenter.veeam.com/backup/80/v ... ts_vm.html), but they would always show as 'Error: Script finished execution with unexpected exit code: 1' in the Veeam UI. This would happen even with all but the most basic commands in the script, when hard-coding a successful exit-code (exit 0) and even when our own logging indicated that the script was executing successfully. Each time this occurred, we would also see '[ScriptInvoker] Exception thrown during script execution (SSH).' in the VM's "task log".

After much troubleshooting and with the assistance of Chris Vollentine from Veeam Support (case#: 00964208), we were able to determine that if the script, or any commands in it, generate any output back to Veeam, it will be interpreted as a false-failure. We were able to get things working by making sure any/all commands in our script redirected all output to /dev/null (> /dev/null 2>&1 &).

With this in place, the scripts would execute successfully and report as such in the UI.
jessethomas
Novice
 
Posts: 9
Liked: 4 times
Joined: Wed Feb 01, 2012 4:01 pm
Full Name: Jesse Thomas

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby Shestakov » Fri Jul 10, 2015 10:16 pm

Hello Jesse,
Thanks a lot for helping us to improve the product!
I`ll sent your observations to our QA team for an additional research(probably Chris has already done it, but I`ll check).
Shestakov
Veeam Software
 
Posts: 5210
Liked: 433 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby bbibber » Sun Jul 12, 2015 11:28 pm

Very useful :-)

Linux scripts are uploaded over SSH. We backup Linux servers on a network that's not reachable by the Veeam backup software. I presume these scripts won't work then? Would it be hard to implement VIX the same way as for Windows machines?

I guess in that case I can still use the pre-freeze/post-thaw scripts invoked by VMware-tools?

Sincerely
Guy
bbibber
Influencer
 
Posts: 22
Liked: 4 times
Joined: Fri Mar 06, 2015 8:29 pm
Location: Mechelen, Belgium
Full Name: Guy Schellens

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby jessethomas » Tue Jul 14, 2015 5:29 pm

@Shestakov - thanks! I believe Chris was also going to do the same.

@bbibber - Based on what was happening in our environment, I believe VIX is guest-agnostic and can/will be used for Linux machines as well, if the SSH-method doesn't work for any reason (bad username/password, no connectivity, etc.). However, I didn't see specific mention of this in the documentation (possible I missed it, and/or was not looking in the correct place).

I also believe you can still use the "vmware" method of creating /usr/sbin/pre-freeze-script.sh and /usr/sbin/post-thaw-script.sh, which will be called whenever a snapshot is created (via Veeam or otherwise), however, we wanted to additional logging in Veeam so we would know if execution was successful.

For more info: https://pubs.vmware.com/vsphere-50/inde ... A79D2.html
jessethomas
Novice
 
Posts: 9
Liked: 4 times
Joined: Wed Feb 01, 2012 4:01 pm
Full Name: Jesse Thomas

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby v.Eremin » Wed Jul 15, 2015 11:10 am

Yep, pre-freeze and post-thaw scripts should work for Linux VMs over VIX without issues. If that doesn't happen, you should open a ticket with our support team. Thanks.
v.Eremin
Veeam Software
 
Posts: 13882
Liked: 1038 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby bbibber » Fri Jul 24, 2015 8:45 am

The credential test of our Linux servers we want to reach over VIX fails.

In the documentation there is no mention this works.
http://helpcenter.veeam.com/backup/80/v ... ts_vm.html
bbibber
Influencer
 
Posts: 22
Liked: 4 times
Joined: Fri Mar 06, 2015 8:29 pm
Location: Mechelen, Belgium
Full Name: Guy Schellens

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby v.Eremin » Fri Jul 24, 2015 11:03 am

Test credentials should verify both type of connections network and networkless. So, if connection over VIX failes, there must be something wrong with provided credentials or one of the requirements isn't met. Can you tell us the exact error you got?
v.Eremin
Veeam Software
 
Posts: 13882
Liked: 1038 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby bbibber » Mon Jul 27, 2015 9:51 pm

Hi Vladimir
I'll give you more details about the errors tomorrow. I was wondering if the problem could have something to do with the way vmware-tools is installed on our Linux guests?
bbibber
Influencer
 
Posts: 22
Liked: 4 times
Joined: Fri Mar 06, 2015 8:29 pm
Location: Mechelen, Belgium
Full Name: Guy Schellens

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby v.Eremin » Tue Jul 28, 2015 7:42 am

Is it VMware Tools or Open-VM ones?
v.Eremin
Veeam Software
 
Posts: 13882
Liked: 1038 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby bbibber » Tue Jul 28, 2015 8:05 am

Hi Vladimir,
(edited this post with new info)
This is VMware tools.

I got a look at the details. When I initiate a "Guest Credentials Test" in our Backup Job, it only tries to use VIX when I supply Windows credentials (Connecting to guest OS via VIX, user .... Error ... ). If I use Linux credentials it only tries to connect with SSH, this doesn't work as the VM's are on an isolated network.
bbibber
Influencer
 
Posts: 22
Liked: 4 times
Joined: Fri Mar 06, 2015 8:29 pm
Location: Mechelen, Belgium
Full Name: Guy Schellens

Re: Pre-freeze & Post-thaw Scripts [Linux]

Veeam Logoby Anguel » Tue Nov 14, 2017 4:25 pm

jessethomas wrote:After much troubleshooting and with the assistance of Chris Vollentine from Veeam Support (case#: 00964208), we were able to determine that if the script, or any commands in it, generate any output back to Veeam, it will be interpreted as a false-failure. We were able to get things working by making sure any/all commands in our script redirected all output to /dev/null (> /dev/null 2>&1 &).

With this in place, the scripts would execute successfully and report as such in the UI.


I also spent hours with troubleshooting and came to a similar conclusion, BTW I am on Hyper-V.
I have written about this in my blog if anyone is interested:
http://techie-blog.blogspot.de/2017/11/ ... ecute.html

Sorry, but I really find Veeam docs insufficient on Linux VM topics.

Anguel
Anguel
Enthusiast
 
Posts: 89
Liked: 8 times
Joined: Thu Apr 16, 2015 9:01 am


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Google Feedfetcher and 1 guest