Start-VBRWindowsFileRestore and getting a folder path

PowerShell script exchange

Re: Start-VBRWindowsFileRestore and getting a folder path

Veeam Logoby alex.nunley » Thu Jan 23, 2014 9:56 pm

So we followed the methodology noted here http://forums.veeam.com/veeam-backup-replication-f2/disk-cleanup-mount-cache-t18515.html. This worked, but isnt the way I wanted to do in the first place...


You know what, I am realizing this isn't what I wanted to do, and I am convinced I cant do what I wanted to do, which is to loop based solely on the date. This is still sorting and selecting the first one.

I guess I could do some thing where the value in the select - First 1 gets incremented every cycle. Not exactly what I wanted, but okay. I guess I could do a thing where the value is incremented every time it finds a value in creationtimestring, and that gets decremented each run through the other loop.

More work to be done.
alex.nunley
Influencer
 
Posts: 19
Liked: never
Joined: Fri Jan 18, 2013 3:36 pm
Full Name: Alex Nunley

Re: Start-VBRWindowsFileRestore and getting a folder path

Veeam Logoby v.Eremin » Fri Jan 24, 2014 8:46 am

So, the cause seems to have been the way $RestorePoint variable was assigned.

You know what, I am realizing this isn't what I wanted to do, and I am convinced I cant do what I wanted to do, which is to loop based solely on the date

As long as the date stored in csv file coincides with the creation date of given restore point, there shouldn't be any issues in selecting the right restore points by its date.

Though, I'm wondering whether there is only one restore point created on a given date. In other words, can't it be that there are two restore points (for instance) assigned to $RestorePoint variable, and the script tries to start FLR session for both of them simultaneously, which results in "Exception" error? So, if I were you, I would double check it first.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Start-VBRWindowsFileRestore and getting a folder path

Veeam Logoby alex.nunley » Mon Jan 27, 2014 2:41 pm

One of the great things about the creationdatestring, is that it includes time, so it should keep them separate, even if they occur on the same day.
alex.nunley
Influencer
 
Posts: 19
Liked: never
Joined: Fri Jan 18, 2013 3:36 pm
Full Name: Alex Nunley

{MERGED] : COIBFileInfo data type

Veeam Logoby drcurtis » Wed May 21, 2014 11:23 pm

I've been asked by our database team to set up a script that restores Windows guest files from one VM to a separate VM. More specifically, they're looking to pull database files from a production DB server into a development DB server. This way, the dev server always has updated data to test.

For instance, I want to restore VM-PROD H:\SQLData\*.mdf into VM-DEV H:\VeeamStaging. Using the GUI is simple enough, I just specify \\VM-DEV\H$\VeeamStaging in the popup destination prompt and it transfers across the network. I want to replicate this behavior using a PowerShell script.

So I'm playing with the Start-VBRRestoreVMFiles cmdlet, and this is what I have:

Code: Select all
Start-VBRRestoreVMFiles $restorepoint -Server $server -path "\\VM-DEV\H$\VeeamStaging" -Files ...

And here is where I'm confused. The parameter type for -Files is COIBFileInfo[], but nowhere can I find a description of what that data type is.

What type of parameter am I supposed to pass in here? I can't use a string such as "C:\path\", so what are my options?

Thanks in advance!
-David
drcurtis
Lurker
 
Posts: 1
Liked: never
Joined: Wed May 21, 2014 10:33 pm
Full Name: David Curtiss

Re: COIBFileInfo data type

Veeam Logoby nefes » Thu May 22, 2014 8:02 am

Have you already reviewed online help here?
The commandlet you are referring is restoring VM configuration files/disks rather than in-guest files.
You need to use Start-VBRWindowsFileRestore and copy files from mount point to share after that.
Documentation referred above provides some simple sample, please ask any additional questions, if required.
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes

Re: Start-VBRWindowsFileRestore and getting a folder path

Veeam Logoby v.Eremin » Thu May 22, 2014 9:12 am

Hi, David, please take a look at the answers provided above. They contain workable examples of Windows restore can be scripted. Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

[MERGED] : Restore File, VM using Powershell Scripting

Veeam Logoby jyothi » Tue Aug 18, 2015 7:24 am

Hi Team,

Could someone please help us in having a script in place for restoring a file and VM using Powershell , also process to perform same.

Veeam Backup & Replication version -7.0.0.871.

Your inputs are highly appreciable.

Regards,
jyothi
jyothi
Lurker
 
Posts: 1
Liked: never
Joined: Tue Aug 18, 2015 7:18 am
Full Name: Jyothi Nori

Re: Start-VBRWindowsFileRestore and getting a folder path

Veeam Logoby v.Eremin » Tue Aug 18, 2015 8:24 am

Code examples that work with version 7 can be found above. If someday you update to version 8, kindly, use script provided in the adjacent thread. Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Previous

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 6 guests