Script before/after Backup

Availability for the Always-On Enterprise

Script before/after Backup

Veeam Logoby tweety2007 » Sat Feb 18, 2017 3:38 pm

Hello together,

I have two little questions, I would like to start a CMD-Script before and after a backup job.

The script is a cmd-file, that will stopp an oracle database before the backup job and will start
the database after the successful backup.

At first, on which menu I must set the information?
Application --> aware-processing --> Applications --> Edit ---> Script
or
Storage --> Advanced --> Scripts

And the second questions:
Can I paste a windows-network path like \\servername\c$\script.cmd?
At the Script, there was a link to an other file... Possible?

Thanks for your help and enjoy jour weekend
Jochen
tweety2007
Novice
 
Posts: 3
Liked: never
Joined: Sat Feb 18, 2017 3:31 pm
Full Name: Thomas

Re: Script before/after Backup

Veeam Logoby Shestakov » Sat Feb 18, 2017 5:13 pm 1 person likes this post

Hello and welcome to the community!
At first, on which menu I must set the information?
Application --> aware-processing --> Applications --> Edit ---> Script
or
Storage --> Advanced --> Scripts

It depends when you want to run the scripts.
In the first case they will take place before and after the job run, in the second case before and after the snapshot creation. By the way in the second case script execution settings can be configured per VM or per container, depending on the objects included in the job.
I guess you need the second one.
Shestakov
Veeam Software
 
Posts: 4951
Liked: 407 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Script before/after Backup

Veeam Logoby tweety2007 » Sun Feb 19, 2017 10:34 am

Thanks for your fast answer!

At the first script i will do the following things:

sqlplus user/password as sysdba @down.sql
(The CMD-File need a second file "down.sql")
shutdown immediate
exit

At the second i will start a windows service:
net start SERVICENAME

It is important to stop the database, before the backup will start.
From my side, i think it is better to take the first case - isn't it?

Thanks
Jochen
tweety2007
Novice
 
Posts: 3
Liked: never
Joined: Sat Feb 18, 2017 3:31 pm
Full Name: Thomas

Re: Script before/after Backup

Veeam Logoby Shestakov » Sun Feb 19, 2017 11:07 am 1 person likes this post

It depends on your needs, I`m not sure how critical the database downtime for you. You may want not to wait while the backup data is compressed and transferred to the target.
Shestakov
Veeam Software
 
Posts: 4951
Liked: 407 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Script before/after Backup

Veeam Logoby tweety2007 » Sun Feb 19, 2017 11:12 am

Thanks!
This is no problem.. We have one night for the backup :-)

Could you tell me, two more things?

Can I save the scripts on the target server or should i save the script on the backup-server?
Is it possible at the veeam software to refer a script to an other file?

Greetings
Jochen
tweety2007
Novice
 
Posts: 3
Liked: never
Joined: Sat Feb 18, 2017 3:31 pm
Full Name: Thomas

Re: Script before/after Backup

Veeam Logoby Shestakov » Sun Feb 19, 2017 11:28 am 1 person likes this post

Sure,
Can I save the scripts on the target server or should i save the script on the backup-server?

As far as I know it`s possible to start scripts based remotely.
Is it possible at the veeam software to refer a script to an other file?

You can specify *cmd,*exe or *bat files as the job pre/post-activity. Or you mean calling one script from another?
Thanks!
Shestakov
Veeam Software
 
Posts: 4951
Liked: 407 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Script before/after Backup

Veeam Logoby v.Eremin » Sun Feb 19, 2017 2:24 pm

From my side, i think it is better to take the first case - isn't it?

How many VMs are included in backup job? If more than one, you'd better use pre-freeze/post-thaw in-guest scripts, instead of pre/post-job ones.

The reason is in this case the database will be frozen only for the duration of snapshot creation. Freezing db for the duration of backup job is not required.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13433
Liked: 988 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: benks, Google [Bot] and 20 guests