cancel
Showing results for 
Search instead for 
Did you mean: 

Scripted restore selection problem (PowerShell)

dge2016
Level 2

I'm hoping somebody can help me,

I've got a requirement to script the restore of imported tapes through a tape library on a Windows Backup Exec 2014 installation. I've had  success with scanning, inventorying and cataloging via PowerShell but have hit a roadblock when it comes to the restore.

These tapes are backed up at a seperate site by a different company and shipped to me. All I want to do is pull everything off of it and redirect it to a local disk. Normally this isn't an issue through the GUI; I inventory and catalog, then select the 'foreign' servers, select files and folders, set the 'from' date back, tick all the folders and go from there. Once I've pulled the data off the tape, my Backup Exec servers is cleared down (media/jobs/servers,etc to return it to a 'blank' state, ready for the next tape that arrives)

Using the Submit-BEFileSystemRestoreJob cmdlet though, I have to provide the FileSystemCollection argument and I can't wildcard that. I don't know if/how I can generate a filelist from the catalog job. It seems that a backup job MUST have been run locally in order to get a FileSystemCollection.

Is there any way around this? As I say, I don't need to select specific files, I'm happy to have everything that's on the tape. If it comes to it, would it be feasible to pull the data from the database somehow. It's available to the GUI interface, I just need to get to it!

 

Thanks for any help anyone can give

Darren

1 ACCEPTED SOLUTION

Accepted Solutions

dge2016
Level 2

figured it out :)

I did a Get-BeAgentServer for the catalogued/foreign servers and then read in the drive letters and passed these into a restore job argument, adding wildcard paths

 

Now I just need to figure out how to delete the imported servers after the restore job has run. They're in the All Servers group but this doesn't appear to be a valid selection when you run a remove-beagentserverfromgroup cmdlet.  A bit more playing is required I think :)

View solution in original post

1 REPLY 1

dge2016
Level 2

figured it out :)

I did a Get-BeAgentServer for the catalogued/foreign servers and then read in the drive letters and passed these into a restore job argument, adding wildcard paths

 

Now I just need to figure out how to delete the imported servers after the restore job has run. They're in the All Servers group but this doesn't appear to be a valid selection when you run a remove-beagentserverfromgroup cmdlet.  A bit more playing is required I think :)