PowerShell script exchange
Post Reply
Tobias_Elfstrom
Enthusiast
Posts: 84
Liked: 8 times
Joined: Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom
Contact:

Add objects to VBR tape job

Post by Tobias_Elfstrom » 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.

veremin
Product Manager
Posts: 17440
Liked: 1553 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add objects to VBR tape job

Post by veremin » Feb 13, 2015 10:00 am

Is it files to tape or backups to tape job?

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

Re: Add objects to VBR tape job

Post by Tobias_Elfstrom » Feb 13, 2015 10:08 am

In this case backups to tape

veremin
Product Manager
Posts: 17440
Liked: 1553 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add objects to VBR tape job

Post by veremin » 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.

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

Re: Add objects to VBR tape job

Post by Tobias_Elfstrom » Feb 13, 2015 1:52 pm

I would consider both options... if both where possible :)

veremin
Product Manager
Posts: 17440
Liked: 1553 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add objects to VBR tape job

Post by veremin » 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.

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

Re: Add objects to VBR tape job

Post by Tobias_Elfstrom » Feb 13, 2015 2:10 pm

Okej, I will work with replacing then.
Thanks. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests