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 »

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: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add objects to VBR tape job

Post by veremin »

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 »

In this case backups to tape
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add objects to VBR tape job

Post by veremin »

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 »

I would consider both options... if both where possible :)
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add objects to VBR tape job

Post by veremin »

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 »

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

Who is online

Users browsing this forum: No registered users and 12 guests