PowerShell script exchange
Post Reply
bkejser
Novice
Posts: 5
Liked: never
Joined: Apr 11, 2016 4:43 am

Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by bkejser »

Hi

The following Powershell script would display a single backup in VEEAM 8. After upgrading to VEEAM 9 it returns nothing.

Get-VBRBackup | Remove-VBRBackup -Confirm:$false | Out-Null;
Import-VbrBackup -Server (Get-VBRLocalHost) -FileName "{path to vbk file}"
Get-VBRBackup

Is this a bug in VEEAM 9 or am I doing something wrong?

Thanks
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by veremin »

I've just checked and imported backups seem to be returned by Get-VBRBackup cmdlet. So, something must be wrong with import command, can you tell me whether the corresponding .vbk file gets imported successfully, meaning it's shown under "Backups (imported)" node in GUI? Thanks.
bkejser
Novice
Posts: 5
Liked: never
Joined: Apr 11, 2016 4:43 am

Re: Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by bkejser »

If I click on the "BACKUP & REPLICATION" link and expand "Backups" and "Disk (VeeamZip)", I can see the imported backup. Get-VBRBackup is still not listing anything.
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by veremin »

I think you'll need to import that backup first in order for it to get returned by Get-VBRBackup cmdlet.

In version 8 we didn't even have a Disk (VeeamZIP) node, so not sure what behaviour changes you're talking about.

Thanks.
bkejser
Novice
Posts: 5
Liked: never
Joined: Apr 11, 2016 4:43 am

Re: Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by bkejser »

It looks like Import-VbrBackup is not the problem.

Get-VBRBackup is only returning backups done before the upgrade to version 9. Any backups created on the local machine or created on another machine and imported into the local machine (using Import-VbrBackup or the GUI) are not returned by Get-VbrBackup.

Is this a bug?
bkejser
Novice
Posts: 5
Liked: never
Joined: Apr 11, 2016 4:43 am

Re: Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by bkejser »

I took a look at the database and the target_type column of the [VeeamBackup].[dbo].[Backup.Model.Backups] table is the cause of the problem. Backups created before the upgrade have a value of 0; backups created after the upgrade have a value of 7. If I change the record from 7 to 0, it shows up in the results of the Get-VbrBackup statement.

What's going on here? Is this a configuration issue, scripting problem or a bug?
bkejser
Novice
Posts: 5
Liked: never
Joined: Apr 11, 2016 4:43 am

Re: Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by bkejser »

I've changed the target_type from 7 and 0 and ran a restore. Everything worked as it did on VEEAM 8.

Why is the target_type equal to 7? Am I skipping a step somehwere?
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Import-VbrBackup broken after VEEAM 8 to 9 upgrade

Post by veremin »

Backups created before the upgrade have a value of 0; backups created after the upgrade have a value of 7.
This indicates problem with configuration database, rather than with a script itself. So, you'd better reach our support team, as experienced behaviour is definitely unexpected. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests