Discussions specific to the Microsoft Hyper-V hypervisor
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 » May 15, 2013 3:40 pm

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.
Product Manager
Posts: 22968
Liked: 1555 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. » May 15, 2013 3:58 pm

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 » May 16, 2013 8:07 pm

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.
Product Manager
Posts: 22968
Liked: 1555 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. » May 16, 2013 9:46 pm

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 » May 17, 2013 11:58 am

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: 16867
Liked: 1429 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 » May 20, 2013 10:19 am 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 » May 20, 2013 3:24 pm

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: 16867
Liked: 1429 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 » May 20, 2013 4:35 pm

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 » May 21, 2013 1:17 pm

Anxiously waiting for the results too.

veremin
Product Manager
Posts: 16867
Liked: 1429 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 » May 21, 2013 1:23 pm

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 » Dec 14, 2016 9:39 am

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.
Product Manager
Posts: 22968
Liked: 1555 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. » Dec 14, 2016 11:04 am

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: 16867
Liked: 1429 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 » Dec 14, 2016 11:08 am

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 » Feb 06, 2017 1:30 pm

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: 16867
Liked: 1429 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 » Feb 06, 2017 2:01 pm

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 » Feb 06, 2017 2:25 pm

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: 16867
Liked: 1429 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 » Feb 07, 2017 10:12 am

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 » Feb 10, 2017 11:12 am

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: 16867
Liked: 1429 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 » Feb 14, 2017 9:45 am

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 » Feb 14, 2017 12:07 pm

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.
Product Manager
Posts: 22968
Liked: 1555 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. » Feb 17, 2017 5:00 pm

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 16 guests