Host-based backup of Microsoft Hyper-V VMs.
Post Reply
TWBrowning
Influencer
Posts: 13
Liked: 1 time
Joined: Feb 22, 2012 10:35 am
Full Name: Tom Browning
Contact:

Pre-freeze and post-thaw for Hyper-V

Post by TWBrowning »

Does anyone know if Hyper-V includes any provision for pre-freeze or post-thaw scripts that Veeam B&R would be able to take advantage of?

I know how to do this when backing up vSphere VMs but not with Hyper-V ones.

We have non-VSS compatible database applications which I'd like to be able to freeze and thaw around Veeam backups of Hyper-V VMs, without having to resort to keeping distinct schedules in sync with one another.

So far the only suggestion I've found is to invoke the backup itself via a scheduled script, which freezes and thaws the database itself. But that's not preferrable.

Thanks,

Tom
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2802 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by Vitaliy S. »

Hi Tom,

I'm not aware about pre-freeze scripts functionality of Hyper-V integration services either, so it seems like the variant you've mentioned is a way to go.

Thanks!
ravelin
Veeam ProPartner
Posts: 48
Liked: 3 times
Joined: Apr 30, 2012 9:37 am
Full Name: Kenneth Westergaard
Contact:

[MERGED] Backup of Lotus Notes Domino server

Post by ravelin »

As far as I know, HyperV can not use pre freeze as vmware can in the subjects i've seen on these forums:
http://forums.veeam.com/viewtopic.php?f ... ino#p18740
So what do we do?
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2802 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by Vitaliy S. »

Hi Kenneth, I believe Tom's suggestion should be used in this case.
TWBrowning
Influencer
Posts: 13
Liked: 1 time
Joined: Feb 22, 2012 10:35 am
Full Name: Tom Browning
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by TWBrowning »

Unfortunately that means our non-VSS-compatible database will have to be off for the entire duration of the backup, instead of just for the duration of the snapshot operation.
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by veremin » 1 person likes this post

Unfortunately that means our non-VSS-compatible database will have to be off for the entire duration of the backup, instead of just for the duration of the snapshot operation.
Hi, Tom.

In fact, we (I, and Vitaliy) managed to find a way you can use VMware post-freeze/post-thraw scripts analogue in Hyper-V environment.

The algorithm should be as a following:

1) Freeze the Lotus Domino databases.
2) Start a given VB&R Job.
3) Once the snapshot of VM is taken, unfreeze the Lotus Domino databases.

In PS it should look like this:

Code: Select all

Add-PSSnapin VeeamPSSnapin
{Part responsible for freezing Lotus Domino databases}
#The next part will check a status of a job task session with a specified delay, (in the example provided below the delay is 15 seconds). If the status changes from "Pending" to "InProgress", it means that corresponding snapshot has been taken, and that databases can be unfrozen.
asnp VeeamPSSnapin 
$Job = Get-VBRJob -name "Name of your Job"
Start-VBRJob -Job $Job -RunAsync
do{Start-Sleep -seconds 15} while ($Job.FindLastSession().GetTaskSessions().Status -ne "InProgress")
{Part responsible for unfreezing Lotus Domino databases} 
The example provided above guarantees that the databases will be frozen only for short interval and not for the whole job duration.

Hope this helps.
Thanks.
TWBrowning
Influencer
Posts: 13
Liked: 1 time
Joined: Feb 22, 2012 10:35 am
Full Name: Tom Browning
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by TWBrowning »

v.Eremin wrote:In fact, we (I, and Vitaliy) managed to find a way you can use VMware post-freeze/post-thraw scripts analogue in Hyper-V environment.
That's excellent! I'll give it a try in our lab environment.

Thanks!

Tom
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by veremin »

I'll give it a try in our lab environment.
Kindly keep us updated about the results you get. Thanks.
ravelin
Veeam ProPartner
Posts: 48
Liked: 3 times
Joined: Apr 30, 2012 9:37 am
Full Name: Kenneth Westergaard
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by ravelin »

Anxiously waiting for the results too.
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by veremin »

Anxiously waiting for the results too.
I’ve tested a middle part of the script that is responsible for checking status of task sessions and everything seemed to work as expected.

So, the question is to use proper pre-freeze/post-thaw scripts that will freeze/unfreeze Lotus Domino databases successfully.

Thanks.
nakamitchi
Novice
Posts: 8
Liked: never
Joined: Dec 14, 2016 7:42 am
Full Name: Sysadminas
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by nakamitchi »

Hello,
We have the same issue with backup of Lotus Domino.
We dont have Test environment. To test every way...
I read a lot off topics about backuping Domino`s. Mostly everyone use vmware, not hyper-v
What would be the best practise to backup Lotus Domino with VB&R 9.5 using Hyper-v ?
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2802 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by Vitaliy S. »

There shouldn't be any difference if you use pre-freeze/post-thaw scripts, since these scripts will do all the heavy-lifting by preparing your application for backups. On the other hand, if you're running Lotus Domino on a Windows Server and it has VSS writers and providers, then enabling AAP option should be a way to go.
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by veremin »

Lotus Domino doesn't seem to be VSS-compatible.

The only difference is that pre-freeze and post-thaw scripts are (now available in VB&R), which means you don't have to create a script that does everything (executes job, freezes db, check job status, etc.) - setting db freeze/unfreeze scripts accordingly would be enough.

Thanks.
nakamitchi
Novice
Posts: 8
Liked: never
Joined: Dec 14, 2016 7:42 am
Full Name: Sysadminas
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by nakamitchi »

v.Eremin wrote:Lotus Domino doesn't seem to be VSS-compatible.

The only difference is that pre-freeze and post-thaw scripts are (now available in VB&R), which means you don't have to create a script that does everything (executes job, freezes db, check job status, etc.) - setting db freeze/unfreeze scripts accordingly would be enough.

Thanks.
Hello,
Can you explain more ?
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by veremin »

Basically, now you only need two scripts: one freezing db and one unfreezing it, where previously you've had to write a script that executes a job, freezes db, checks job status, unfreeze db based on the results it get and so on.

The mentioned scripts should be set in corresponding job options as pre-freeze, post-thaw scripts.

Thanks.
nakamitchi
Novice
Posts: 8
Liked: never
Joined: Dec 14, 2016 7:42 am
Full Name: Sysadminas
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by nakamitchi »

v.Eremin wrote:Basically, now you only need two scripts: one freezing db and one unfreezing it, where previously you've had to write a script that executes a job, freezes db, checks job status, unfreeze db based on the results it get and so on.

The mentioned scripts should be set in corresponding job options as pre-freeze, post-thaw scripts.

Thanks.
Sorry, I`m confused..
About what script are you talking ?

I`m using this prefreeze script

Code: Select all

@echo off
if %1 == freeze goto freeze
if %1 == thaw goto thaw
if %1 == freezeFail goto freezeFail

:freeze
Net Stop "Lotus Domino Server (Dnotesdata)"
exit
:thaw
net start "Lotus Domino Server (Dnotesdata)"
exit
:freezeFail
net start "Lotus Domino Server (Dnotesdata)"
exit
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by veremin »

Specify this script with "freeze" argument as pre-freeze script and with "thaw" argument as post-thaw script. Thanks.
nakamitchi
Novice
Posts: 8
Liked: never
Joined: Dec 14, 2016 7:42 am
Full Name: Sysadminas
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by nakamitchi »

v.Eremin wrote:Specify this script with "freeze" argument as pre-freeze script and with "thaw" argument as post-thaw script. Thanks.
Do you mean like this ?

prefreeze

Code: Select all

@echo off
if %1 == freeze goto freeze
if %1 == freezeFail goto freezeFail

:freeze
Net Stop "Lotus Domino Server (Dnotesdata)"
exit
:freezeFail
net start "Lotus Domino Server (Dnotesdata)"
exit
thaw

Code: Select all

@echo off
if %1 == thaw goto thaw
if %1 == thawFail goto thawFail

:thaw goto thaw
Net Stop "Lotus Domino Server (Dnotesdata)"
exit
:thawFail
net start "Lotus Domino Server (Dnotesdata)"
exit
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by veremin »

That's something what I've meant:

Image
nakamitchi
Novice
Posts: 8
Liked: never
Joined: Dec 14, 2016 7:42 am
Full Name: Sysadminas
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by nakamitchi »

Sorry, thats my fault...I know where is it
I want to ask about my script above. Prefreeze and thaw scripts are correct ?
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2802 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Pre-freeze and post-thaw for Hyper-V

Post by Vitaliy S. »

What happens when you execute them manually? If the database freezes, then they are correct.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests