Restore Same Folder/Files From Multiple Backups


Userlevel 4
Badge

First time sharing, so feedback is much appreciated, but please excuse my code if it’s not up to par with those who have a lot more experience with Powershell than I.

 

I recently had a client who -- for legal purposes -- needed to restore the same folder from two month’s worth of backups. Running 61 File Level Restores in the GUI seemed like a nightmare, so he opened a case asking if there was an easier way. Unfortunately, through the GUI there’s really not an easier way, but this sounded like a perfect scenario for leveraging some Veeam PowerShell cmdlets. I soon discovered that the FLR cmdlets don’t have functionality that supports a ‘Copy To’ feature like you’d get in the GUI, so I had to leverage what Veeam cmdlets we do have and then add in some good old basic PowerShell commands to then pull the data from the mount point (C:\VeeamFLR\ by default) and move it to the target, then loop through n-number of times based on the user input.

Here’s what I came up with. I’m still working on it and trying to improve it, so I’m definitely open to feedback on what I have. Even if it’s just to point out an easier method of doing something I’ve managed to pull off in some ugly, less efficient way. My purpose for making this was not just to help out a client (although technically support doesn’t create custom scripts for clients) but I felt this was a perfect excuse for me to learn PowerShell more in-depth and expand my knowledge of Veeam and PowerShell at once.

I plan on submitting it to VeeamHub as well, but I haven’t got around to it. I wanted to share what I currently have with the community in hopes someone else will find it helpful and/or provide more opportunities for me to learn!

https://github.com/cevans3505/Veeam-Multi-FLR


2 comments

Userlevel 7
Badge +8

Thank you, il will be useful for some use cases!

 

I have a question correlated with FLR on linux hosts, do you know how to change the system target? 
Sometimes you can have the use case to restore a file from a system directly to another? Veeam asks me this only when the vm was re generate by ansible, the name doesn’t change but the VM ID yes.

Userlevel 4
Badge

Thank you, il will be useful for some use cases!

 

I have a question correlated with FLR on linux hosts, do you know how to change the system target? 
Sometimes you can have the use case to restore a file from a system directly to another? Veeam asks me this only when the vm was re generate by ansible, the name doesn’t change but the VM ID yes.

 

I should actually edit my script to distinguish the fact that I only tested this for Windows servers; I completely overlooked Linux ::facepalm:: It hadn’t even crossed my mind. I’ll actually work on that as soon as I get time.

As for your question.. are you asking if it’s possible to restore a file from one server to a location on a separate server? If that is what you were referring to then yes, this script supports UNC path as a target to copy files to, so as long as you can reach the target via UNC then the script will support it (at least I can confirm that’s the case for Windows OS’, specifically).

Comment