Quantcast
Channel: Symantec Connect - Backup and Recovery
Viewing all articles
Browse latest Browse all 6339

Using powershell to change mediaset

$
0
0
I need a solution

Hi,

I'm planning to have all scheduling jobs in my VTOM scheduler and try to make as few jobs as possible in Backupexec in order to hold them and run from VTOM.

i try to have the same duplicate on tape job for weekly,monthly and yearly full backup, i just need to change the mediaset.

for monthly i set the following script :

i export the list of jobs who are set to mediaset "Weekly_gold"

Get-BEJob | Where-Object {($_.storage -like "ROBOT*") -AND ($_.mediaset -eq "Weekly_Gold")} | Select-Object name,storage,mediaset > c:\scripts\output\jobs_robot_gold.txt

Then i parse this log to have valide backupdefinitions and duplicatestagebackuptask's name, for example MyServer as jobdefinition & Ontape for duplicate tesk and do the following :

Set-BEDuplicateStageBackupTask -backupdefinition "MyServer" -name "OnTape" -TapeStorageMediaSet "Monthly_Gold" | Save-BEBACKUPDEFINITION

 

the script works without error but change the media set for "keep data for 4 weeks" instead of the Monthly_Gold expected.

 

get-bemediaset will display Monthly_Gold correctly.

If someone have a clue ... :)

 

OS : windows 2008 SP2

Backup exec 2012 SP1

 

 

 


Viewing all articles
Browse latest Browse all 6339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>