Page 1 of 1

Creating a backup job for a template

Veeam LogoPosted: Thu Mar 08, 2012 2:18 pm
by Amerloc
I'm using the same command for creating backup jobs for VMs and templates:
Code: Select all
Add-VBRBackupJob -Name "JobName" -Type "NET" -Server $server -Folder "DestinationFolder" -Filename "Filename" -Objects "Template_or_VM"

When the object is a VM the job is created correctly, but when the object is a template, the job is created but the object is not added, I have to add it manually using th GUI.

Re: Creating a backup job for a template

Veeam LogoPosted: Wed Mar 14, 2012 8:21 pm
by ThomasMc
pass it the object instead of using a string via the Find-VBRObject as its more reliable this way

Re: Creating a backup job for a template

Veeam LogoPosted: Wed Mar 21, 2012 1:36 pm
by Amerloc
Hi Thomas. Thanks for your reply.
When I run Find-VBRObject, no template is shown on the list and therefore, if I try to store the object name in a variable (i.e.: $obj = Find-VBRObject -Server $server|where {$_.name -eq "Template_Name"}) nothing is stored. ┬┐Is there some parameter needed to find template objects?

Re: Creating a backup job for a template

Veeam LogoPosted: Thu Mar 29, 2012 9:11 am
by jlsung
Hi,
You can use this :
Find-VBRObject $server | where {$_.IsTemplate}

Re: Creating a backup job for a template

Veeam LogoPosted: Mon Apr 02, 2012 12:44 pm
by Amerloc
Hi jlsung. Thank you for your help.
I have tried what you told but as "where {$_.IsTemplate}" is a filter for the "Find-VBRObject" and "Find-VBRObject" doesn't show any template, the "Find-VBRObject $server | where {$_.IsTemplate}" neither shows any template. :-(

Re: Creating a backup job for a template

Veeam LogoPosted: Thu Apr 05, 2012 7:41 am
by jlsung
Hi,

I tried again Find-VBRObject $vcenter | where {$_.IsTemplate} and it shows only template in my vcenter :roll:

Re: Creating a backup job for a template

Veeam LogoPosted: Fri Apr 13, 2012 4:56 pm
by ThomasMc
jlsung wrote:Hi,

I tried again Find-VBRObject $vcenter | where {$_.IsTemplate} and it shows only template in my vcenter :roll:


Same as above

Code: Select all
PS C:\Users\administrator.VPOWERCLI> Find-VBRObject -server $server | ?{$_.IsTemplate}

Name                      MemoryInMB PowerState     IsTemplate Ref
----                      ---------- ----------     ---------- ---
LAB Template DC           2048       PoweredOff     True       vm-83