Comprehensive data protection for all workloads
Post Reply
Rumple
Service Provider
Posts: 81
Liked: 14 times
Joined: Mar 10, 2010 7:50 pm
Full Name: Mark Hodges
Contact:

Shutting down Veeam Servers when jobs are complete

Post by Rumple »

I have a backup respository running in the DR site and on the prduction side I have a couple 4vcpu backup "Servers" running.
One of the things I would love to see in the options is ability to set a shutdown if idle after x job finishes or after xtime.
For instance I'd love to set a shutdown if idle after 6am...if any jobs are finishing up, once they finish then the system would auto power off (and then I'd have a vmware job to power up the virtual Backup server at 6pm

Allow me to save resources during day when I typicalyl have backups idle....
Gostev
Chief Product Officer
Posts: 31460
Liked: 6648 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by Gostev »

Have you though about creating a scheduled PowerShell script that checks if any Veeam jobs are running, and shuts down the server?
Rumple
Service Provider
Posts: 81
Liked: 14 times
Joined: Mar 10, 2010 7:50 pm
Full Name: Mark Hodges
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by Rumple »

thought about it, but my scripting skills suck. Would be nice to have an option in the console or as part of a job (so I could just enable that on the last expected job)
habibalby
Veteran
Posts: 391
Liked: 32 times
Joined: Jul 18, 2011 9:30 am
Full Name: Hussain Al Sayed
Location: Bahrain
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by habibalby »

have an email alert to trigger your mailbox of last Success Job, if that job Finished, then based on the result, have a schedule task to kick start as Shutdown -s -t 1

Thanks,
habibalby
Veteran
Posts: 391
Liked: 32 times
Joined: Jul 18, 2011 9:30 am
Full Name: Hussain Al Sayed
Location: Bahrain
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by habibalby »

or you can use this;

Code: Select all

Get-VBRBackupSession -Name "JobName" | Select JobName, Result 
and based on the LastResult, you can run another script or get use Shutdown.exe -s -t 0
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by Vitaliy S. »

And here is the script example you can use to shutdown VM via PowerCLI: http://waterlovinghead.com/VmwarePowercli
habibalby
Veteran
Posts: 391
Liked: 32 times
Joined: Jul 18, 2011 9:30 am
Full Name: Hussain Al Sayed
Location: Bahrain
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by habibalby » 2 people like this post

Try this out;

Code: Select all

PS C:\> Get-Content C:\jobs.txt | ForEach-Object {Get-VBRBackupSession | Select-
Object JobName, Result} if ((Get-VBRJob | ?{$_.Name -eq $LastJobName}).GetLastresult() -eq "Success" {shutdown.exe -s -t 1}
Post Reply

Who is online

Users browsing this forum: Ivan239, restore-helper, Semrush [Bot] and 289 guests