Add objects to VBR tape job

PowerShell script exchange

Add objects to VBR tape job

Veeam Logoby Tobias_Elfstrom » Fri Feb 13, 2015 9:54 am

Is there currently any what to add objects to an existing tape job with powershell?

If you do:
Code: Select all
$tapejob = Get-VBRTapeJob -Name Name_of_tapejob

You have the objects that are included in the readonly attribute
Code: Select all
$tapejob.Objects


Is there any way for me to add objects here ? (other that using the GUI)

Thanks.
Tobias_Elfstrom
Enthusiast
 
Posts: 84
Liked: 8 times
Joined: Wed Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom

Re: Add objects to VBR tape job

Veeam Logoby v.Eremin » Fri Feb 13, 2015 10:00 am

Is it files to tape or backups to tape job?
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Add objects to VBR tape job

Veeam Logoby Tobias_Elfstrom » Fri Feb 13, 2015 10:08 am

In this case backups to tape
Tobias_Elfstrom
Enthusiast
 
Posts: 84
Liked: 8 times
Joined: Wed Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom

Re: Add objects to VBR tape job

Veeam Logoby v.Eremin » Fri Feb 13, 2015 11:50 am

The last question - do you need to replace tape job source or just add to it another backup job ? Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Add objects to VBR tape job

Veeam Logoby Tobias_Elfstrom » Fri Feb 13, 2015 1:52 pm

I would consider both options... if both where possible :)
Tobias_Elfstrom
Enthusiast
 
Posts: 84
Liked: 8 times
Joined: Wed Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom

Re: Add objects to VBR tape job

Veeam Logoby v.Eremin » Fri Feb 13, 2015 2:06 pm

You can replace a source of backup to tape job via this script:

Code: Select all
asnp VeeamPSSnapin
$TapeJob = Get-VBRTapeJob -Name "Name of your tape job"
$NewObject = Get-VBRJob -Name "Name of your backup job"
Set-VBRBackupToTapeJob -Job $TapeJob -Object $NewObject


As to adding another backup job to the source of backup to tape job, currently it's not possible. No matter what script you write, the source gets overwritten, not appended.

However, we do consider fixing that down the road.

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

Re: Add objects to VBR tape job

Veeam Logoby Tobias_Elfstrom » Fri Feb 13, 2015 2:10 pm

Okej, I will work with replacing then.
Thanks. :)
Tobias_Elfstrom
Enthusiast
 
Posts: 84
Liked: 8 times
Joined: Wed Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests