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

Shutting down Veeam Servers when jobs are complete

Post by Rumple » Oct 06, 2012 4:29 am

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
SVP, Product Management
Posts: 24020
Liked: 3255 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by Gostev » Oct 06, 2012 7:07 am

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: 54
Liked: 1 time
Joined: Mar 10, 2010 7:50 pm
Full Name: Mark Hodges
Contact:

Re: Shutting down Veeam Servers when jobs are complete

Post by Rumple » Oct 17, 2012 3:26 am

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
Expert
Posts: 376
Liked: 23 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 » Oct 17, 2012 8:00 am

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
Expert
Posts: 376
Liked: 23 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 » Oct 17, 2012 8:50 am

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.
Product Manager
Posts: 22311
Liked: 1415 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. » Oct 17, 2012 8:56 am

And here is the script example you can use to shutdown VM via PowerCLI: http://waterlovinghead.com/VmwarePowercli

habibalby
Expert
Posts: 376
Liked: 23 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 » Oct 17, 2012 9:15 am 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: Bing [Bot], Karinne, nuraz19 and 48 guests