-
- Expert
- Posts: 106
- Liked: 13 times
- Joined: Jun 12, 2014 11:01 am
- Full Name: Markko Meriniit
- Contact:
Run script after the backup job but before compact or health check.
I have a job where I have selected "Run the following script after the job" option but when there is a case where health check or compact job is started after the backup then the script is executed after health check or compact job finishes. It is kind of problem and I have to intervene always manually when that happens(because these jobs take so long) and produce the result of the script manually where it is needed. Is it possible to run script after the backup job but before compact or health check? Can it be a feature request if it is not possible?
-
- Veeam Software
- Posts: 614
- Liked: 115 times
- Joined: Dec 31, 2014 3:05 pm
- Full Name: Marco Horstmann
- Location: Hannover, Germany
- Contact:
Re: Run script after the backup job but before compact or health check.
Hi Markko,
I cannot comment to feature requests because I'm not working at product management.
What you can do today Is to write a Powershell script which starts the Job and
runs a "Watchdog" which is looks for specific events / log entries of e.g. compact disk
and triggers the "Post-Job activity"
Here some code examples which are maybe useful.
Best regards
Marco
I cannot comment to feature requests because I'm not working at product management.
What you can do today Is to write a Powershell script which starts the Job and
runs a "Watchdog" which is looks for specific events / log entries of e.g. compact disk
and triggers the "Post-Job activity"
Here some code examples which are maybe useful.
Code: Select all
$jobname = "*Windows Backup Job*"
$job = Get-VBRJob -Name $jobname | Start-VBRBackup
$backupsession = $job.FindLastSession()
# This I would put into a loop every 30secs (maybe with a delay if you know the job runs minimum 2h anyway.)
# you can check with this command if e.g. this entry is in your job log and do your post-job stuff.
$backupsession.Logger.GetLog().updatedrecords | Where-Object { $_.title -match "Primary bottleneck:" }
Marco
Marco Horstmann
Senior System Engineer @ Veeam Software
@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
Senior System Engineer @ Veeam Software
@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
-
- Expert
- Posts: 106
- Liked: 13 times
- Joined: Jun 12, 2014 11:01 am
- Full Name: Markko Meriniit
- Contact:
Re: Run script after the backup job but before compact or health check.
Hello,
thank you for an idea. I guess I ponder about a little because it also introduces kind of additional complexity/problems. Veeam has its own scheduler and to use this script I have to disable Veeam scheduling for this job and use Windows shceduled tasks to run a script. It creates a situation where there is no overview from Veeam's console how backup jobs work.
thank you for an idea. I guess I ponder about a little because it also introduces kind of additional complexity/problems. Veeam has its own scheduler and to use this script I have to disable Veeam scheduling for this job and use Windows shceduled tasks to run a script. It creates a situation where there is no overview from Veeam's console how backup jobs work.
-
- Veeam Software
- Posts: 614
- Liked: 115 times
- Joined: Dec 31, 2014 3:05 pm
- Full Name: Marco Horstmann
- Location: Hannover, Germany
- Contact:
Re: Run script after the backup job but before compact or health check.
Hi Markko,
you're welcome. I can imagine that my workaround is not ideal. I would also prefer if this can be configured in VBR.
Just for unterstanding your request. What are you doing with the post script?
you're welcome. I can imagine that my workaround is not ideal. I would also prefer if this can be configured in VBR.
Just for unterstanding your request. What are you doing with the post script?
Marco Horstmann
Senior System Engineer @ Veeam Software
@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
Senior System Engineer @ Veeam Software
@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
-
- Expert
- Posts: 106
- Liked: 13 times
- Joined: Jun 12, 2014 11:01 am
- Full Name: Markko Meriniit
- Contact:
Re: Run script after the backup job but before compact or health check.
Hello,
we have Evault server which is put in backup mode before the job which backs up Evault server runs and after the job finishes the script notifies Evault server with semaphore file that backup is done and server can clear the backup mode and notify Evault that things are backed up.
we have Evault server which is put in backup mode before the job which backs up Evault server runs and after the job finishes the script notifies Evault server with semaphore file that backup is done and server can clear the backup mode and notify Evault that things are backed up.
-
- Veeam Software
- Posts: 614
- Liked: 115 times
- Joined: Dec 31, 2014 3:05 pm
- Full Name: Marco Horstmann
- Location: Hannover, Germany
- Contact:
Re: Run script after the backup job but before compact or health check.
Ok, I get it, but why you are not using pre- and post script for the VM/agent itself?
Marco Horstmann
Senior System Engineer @ Veeam Software
@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
Senior System Engineer @ Veeam Software
@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
-
- Expert
- Posts: 106
- Liked: 13 times
- Joined: Jun 12, 2014 11:01 am
- Full Name: Markko Meriniit
- Contact:
Re: Run script after the backup job but before compact or health check.
Hello,
if I remember correctly the reasoning behind that was something like - because Evault uses MS SQL database which is located in another server and that server is backed up with same backup job then we don't remove Evault backup mode before both servers are backed up. Because after removing the backup mode Evault may start processing its tasks and the state of backed up SLQ database is not consistent with Evault backed up state. Or something like that.
Maybe I should reconsider/reevaluate things and this per vm script is usable. I guess I have some food for thoughts again.
if I remember correctly the reasoning behind that was something like - because Evault uses MS SQL database which is located in another server and that server is backed up with same backup job then we don't remove Evault backup mode before both servers are backed up. Because after removing the backup mode Evault may start processing its tasks and the state of backed up SLQ database is not consistent with Evault backed up state. Or something like that.
Maybe I should reconsider/reevaluate things and this per vm script is usable. I guess I have some food for thoughts again.
Who is online
Users browsing this forum: Google [Bot] and 36 guests