PowerShell script exchange
Post Reply
ferrus
Veeam ProPartner
Posts: 300
Liked: 44 times
Joined: Dec 03, 2015 3:41 pm
Location: UK
Contact:

Export-VBRBackup Syntax

Post by ferrus »

What value of Get-VBRRestorePoint, does the Export-VBRBackup -RestorePoint parameter use?

I've tried serveral of the values, names, IDs, and filenames - but they all seem to trigger a 'Cannot bind parameter' error.
Alex Uryumtsev
Enthusiast
Posts: 51
Liked: 7 times
Joined: Oct 29, 2018 9:56 am
Full Name: Alexander Uryumtsev
Contact:

Re: Export-VBRBackup Syntax

Post by Alex Uryumtsev »

Hi,

The cmdlet Export-VBRBackup -RestorePoint uses the object that returns Get-VBRRestorePoint cmdlet. For the reference you can check the Example 2 in the linked page.

--au
ferrus
Veeam ProPartner
Posts: 300
Liked: 44 times
Joined: Dec 03, 2015 3:41 pm
Location: UK
Contact:

Re: Export-VBRBackup Syntax

Post by ferrus »

Thanks for the reply.
Sorry, I'm not a frequent powershell user - but I tried the following commands based on that example:

Code: Select all

$rp = Get-VBRRestorePoint -Name *partialbackupfilename*

Export-VBRBackup -RestorePoint $rp -Dir "c:\Backups"
And received the following error:

Could not find file 'vmname.vm-442282D2019-01-09T181115.vib'

I even ran the command from the folder that contains the file.
Is there something wrong with my syntax?
Alex Uryumtsev
Enthusiast
Posts: 51
Liked: 7 times
Joined: Oct 29, 2018 9:56 am
Full Name: Alexander Uryumtsev
Contact:

Re: Export-VBRBackup Syntax

Post by Alex Uryumtsev »

First you need to get backup and then get restore points from that backup.

You script should look like this:

Code: Select all

$rps = Get-VBRBackup -Name "Your backup name"  | Get-VBRRestorePoint -Name *Your backup name*
foreach($rp in $rps) {
    Export-VBRBackup -RestorePoint $rp -Dir "c:\Exports"
}
Let me know how it will work for you.

--au
hero
Lurker
Posts: 1
Liked: never
Joined: Aug 19, 2020 3:20 pm
Full Name: Roman Heini
Contact:

Re: Export-VBRBackup Syntax

Post by hero »

Hi,
Is there a possibility to export with the Powershell Script beside the *.VIB /*.VBK files also the .vbm file?
So that it is possible to create an "Import Backup" later ?
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Export-VBRBackup Syntax

Post by oleg.feoktistov »

Hi Roman,

Try exporting the whole backup chain with Export-VBRBackup -Backup option.
Since this cmdlet is no rocket science and literally copies backups specified, you might as well use native Copy-Item to transfer .vbm file if Export-VBRBackup fails in your case.

Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests