PowerShell script exchange
Post Reply
dsATspace
Influencer
Posts: 19
Liked: never
Joined: Feb 28, 2022 9:09 am
Full Name: dennis
Contact:

Start-VBRRestoreVMFiles - how to use it ?

Post by dsATspace »

Hello,
could somebody help me with "Start-VBRRestoreVMFiles" ?

I need to restore a VM to another destination (veeam b&r, vCenter) and only the OS-DISK without the DataDisks.

Tryed to use the Command: Start-VBRRestoreVMFiles but it will not work.

Have Source VEEAM B&R and Destination VEEAM B&R System, and Source vCenter and Destination vCenter.
I did a Import of Backups from the Source VEEAM B&R System on the Destination VEEAM B&R System.

Code: Select all

$dst = 192.168.1.110   (VEEAM B&R Destination System)
$server = Get-VBRServer -Name $dst
$vmlist = TESTVM1
$restorepoint = Get-VBRRestorePoint -Name $vmlist | Sort-Object –Property CreationTime –Descending | Select-Object -First 1
Start-VBRRestoreVMFiles –RestorePoint $restorepoint -Server $server -Path "E:\RestoreFiles"
But looks I am totaly wrong.

How does it work ?
Is it possible to Restore direct to Destination vCenter ?



Or another Solution for this case: Restore to Destionation vCenter but only the OS-DISK no Datadisks.
oleg.feoktistov
Veeam Software
Posts: 2021
Liked: 673 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Start-VBRRestoreVMFiles - how to use it ?

Post by oleg.feoktistov »

Hi Dennis,

If I understand your goal correctly, you want to import backup of a VM to another VBR server and then restore it to a vCenter.
Start-VBRRestoreVMFiles won't be much of a help here as it exports backup files in a destination format (e.g. Vmware - vmdk, vmx etc.) to a server file system.

There are several approaches to what you are asking, but, generally, the workflow would be the following:

1. Export/Copy backup with Export-VBRBackup or Copy-Item cmdlet. Please note that you need to mount your target server as a network drive to use it as a copy destination. Example with Copy-Item:

Code: Select all

net use \\192.168.0.1\c$
Copy-Item -Path 'C:\Backups\Job_Name\fullBackup.vbk' -Destination \\192.168.0.1\c$\Backups\Job_Name
Example with Export-VBRBackup (note that it is obsolete):

Code: Select all

net use \\192.168.0.1\c$
$backup = Get-VBRBackup -Name 'Backup'
Export-VBRBackup -Backup $backup -Dir \\192.168.0.1\c$\Backups\Job_Name
2. Import it to another VBR server with Import-VBRBackup cmdlet.
3. Use Start-VBRRestoreVM cmdlet to restore the whole VM from scratch or Start-VBRViVirtualDiskRestore cmdlet to restore specific disks (you will need to have a target VM to map these disks to).

Let me know if any further clarification is needed.

Hope it helps,
Oleg
dsATspace
Influencer
Posts: 19
Liked: never
Joined: Feb 28, 2022 9:09 am
Full Name: dennis
Contact:

Re: Start-VBRRestoreVMFiles - how to use it ?

Post by dsATspace »

Hello Oleg,
thank you so much!

Import works, I did it another
I add the VEEAM B&R Source in Destination VEEAM B&R.
( In VEEAN Console in Area: Backup Infrastructure -> Add Server )

So I can Import it like that:

Import-VBRBackup -Server 192.168.0.110 –FileName "E:\Backups\testlinux1\testlinux1.vbm" ( E:\Backups\testlinux1\testlinux1.vbm ist the Path on the Soruce VEEAM B&R )


Start-VBRViVirtualDiskRestore I will try to use - thanks for the hint


Is there no way to restore the VM without DISKs so that I do not need another step for create the VM?



>Let me know if any further clarification is needed.

Thanks I will do!
oleg.feoktistov
Veeam Software
Posts: 2021
Liked: 673 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Start-VBRRestoreVMFiles - how to use it ?

Post by oleg.feoktistov »

Hi Dennis,

Currently, if the target is a vsphere host it's either entire vm restore/instant recovery without the disk exclusion option or virtual disks restore/instant recovery to a target vm with the option to select specific disks.

Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests