PowerShell script exchange
Post Reply
GTFbnelson
Influencer
Posts: 12
Liked: never
Joined: Feb 18, 2019 5:05 am
Full Name: Brad Nelson
Contact:

Script to get all jobs, do a test restore to certain folder

Post by GTFbnelson » Jul 05, 2019 6:07 pm

I want my technicians to do test restores weekly. I would love to have a script they can run manually so it will grab all the jobs, restore a specific file to a specific folder. The tech can then verify the file was restored. is this possible?

example:
If VeeamHostA has the following jobs:
  • Server1 Backup
  • Server2 Backup
  • Server3 Backup
The script will restore a file from each backup job to C:\RestoredBackups.

If possible would love to be able to rename the restored file to SERVERNAME+RestoreTest+DATE, so if im restoring "test.txt" it gets restored as "SERVER+RestoreTest+7-5-2019.txt"

HannesK
Veeam Software
Posts: 3681
Liked: 440 times
Joined: Sep 01, 2014 11:46 am
Location: Austria
Contact:

Re: Script to get all jobs, do a test restore to certain folder

Post by HannesK » Jul 08, 2019 5:55 am

Hello,
that looks possible. As far as I understood, you like to do file level recovery.

The Start-VBRWindowsFileRestore cmdlet should help you.

Best regards,
Hannes

Talom
Influencer
Posts: 23
Liked: 2 times
Joined: Oct 21, 2014 7:56 am
Contact:

Re: Script to get all jobs, do a test restore to certain folder

Post by Talom » Jul 09, 2019 12:04 pm

I would suggest to do it automatically. Get the recent Restorepoints for every server from every job and do it like Hannes said. This script can be executed weekly with windows scheduler and then you can rollout a script which also runs weekly on every server which checks if the the file has the right date and send the result to your monitoring system.
BACKUP EAGLE® Developer

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests