We have a requirement in our company to restore specific files and folder from the most recent backup of a particular production server running Windows Server 2012 R2 to a different server in our development environment running the same OS.
I have been looking through powershell scripts but I am finding it hard to write anything to set the restore location to a different host.
One thing I can think of is to restore the files back onto the production machine to a different drive, then run a robocopy job to move the files to the development server.
I would like to automate the process as much as possible.
What would be the best way of achieving this? And can someone please help with the scripting part
Thank you for your assistance. So my only option would be to restore onto the source backup server in a seperate location then copy to remote server (with some sort of tool)?
I have seen this script before but was unsure if I could add to this to specify a remote server as the restore path.
Just a few of questions -
1. How can I specify a different restore destination rather than original backup location. Is it as easy as defining a new variable?
2. I need to exclude 3 files in the folder that I would like to restore either from the restore job or the copy job. What would be the best way? To mention the exclusion in $origfile or to mention the exclusion in copy?
3. If I used the Veeam copy function, can I put network a location in the copy job?
Copy $file "\\remoteserver1\d$\restore\files"