Restoring a given file from a backup

PowerShell script exchange

Restoring a given file from a backup

Veeam Logoby marius roma » Mon Mar 14, 2016 8:54 am

I need to create a script to restore a given file (let's say, "C:\work\myfile.txt") from all che VMs of a given job and to check if the restore is successful.
If the restore fails I need to detect the reason (file not found, unexisting backup, ...).
IOs there any sample I can start from?
Regards
Marius
marius roma
Expert
 
Posts: 317
Liked: 3 times
Joined: Wed Feb 01, 2012 12:04 pm
Full Name: Mario

Re: Restoring a given file from a backup

Veeam Logoby vmniels » Mon Mar 14, 2016 9:01 am

Are you looking at backup testing automated? Did you take a look at SureBackup which can do a full simulation of a restore and even do in guest testing like for example the MD5 checksum on files?

What you are looking for is possible however it may be easier to use SureBackup for your needs :-)
VCP-DCV
Veeam Certified Engineer
http://foonet.be
vmniels
Veeam Software
 
Posts: 1509
Liked: 325 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen

Re: Restoring a given file from a backup

Veeam Logoby marius roma » Mon Mar 14, 2016 9:52 am

I was told that SureBackup is not available with Standard edition, is it corect?
Regards
marius
marius roma
Expert
 
Posts: 317
Liked: 3 times
Joined: Wed Feb 01, 2012 12:04 pm
Full Name: Mario

Re: Restoring a given file from a backup

Veeam Logoby vmniels » Mon Mar 14, 2016 10:06 am

SureBackup is indeed not available with Standard Edition.

The cmdlet you are looking for is Start-VBRWindowsFileRestore (for Windows servers): https://helpcenter.veeam.com/backup/pow ... store.html

At the bottom is an example of a file being copied from C:\
With this you can start and enhance to your needs. If this fails you will see the reason.
VCP-DCV
Veeam Certified Engineer
http://foonet.be
vmniels
Veeam Software
 
Posts: 1509
Liked: 325 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests