PowerShell script exchange
Post Reply
dquang
Lurker
Posts: 2
Liked: never
Joined: May 15, 2023 10:02 am
Contact:

Get-VBRAzureComputeBackup and Add-VBRBackupCopyJob for Azure backup

Post by dquang »

Hi there,

I am trying to create a backup copy job for an Azure backup and need help to understand some points about command Get-VBRAzureComputeBackup :
  • Get-VBRAzureComputeBackup: where does the data result of this command come from?
  • All of my backups were created from Azure plugin policies, can I sync these abckups to Veeam Replication as result of this command ?
  • How to know the backup type? When I use it for Add-VBRBackupCopyJob, it raised error "Specified backup type is not supported (expected platforms: GCE, Azure IaaS, AWS EC2; expected type: VmbApiPolicyTempJob)"
(VBR-V12, Veeam backup for Azure plugin V5)
Thank you.
Mildur
Product Manager
Posts: 9822
Liked: 2597 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Get-VBRAzureComputeBackup and Add-VBRBackupCopyJob for Azure backup

Post by Mildur »

Hello Dquang
Get-VBRAzureComputeBackup: where does the data result of this command come from?
Veeam configuration database
All of my backups were created from Azure plugin policies, can I sync these abckups to Veeam Replication as result of this command ?
You must integrate your Veeam Backup for Azure appliance with Veeam Backup & Replication.
How to know the backup type? When I use it for Add-VBRBackupCopyJob, it raised error "Specified backup type is not supported (expected platforms: GCE, Azure IaaS, AWS EC2; expected type: VmbApiPolicyTempJob)"
You don't need to know the backup type. Just use Get-VBRAzureComputeBackup to get a list of the VMs to a variable:

Code: Select all

$backups = Get-VBRAzureComputeBackup
Use $backups in the command Add-VBRBackupCopyJob:

Code: Select all

Add-VBRBackupCopyJob -Backup $backups
That should take the right backup type for a new backup copy job of your Azure VM.

Best,
Fabian
Product Management Analyst @ Veeam Software
dquang
Lurker
Posts: 2
Liked: never
Joined: May 15, 2023 10:02 am
Contact:

Re: Get-VBRAzureComputeBackup and Add-VBRBackupCopyJob for Azure backup

Post by dquang »

Thanks Fabian,

I figured it out,
  • First to have data return for cmd Get-VBRAzureComputeBackup, we need to add an External Repository. In my case, I connected to my Veeam Backup for Azure Blob storage.
  • Then "Get-VBRAzureComputeBackup" will return us the data for both Policy and backups inside that policy (I based on the name of return data, should be the same name as in Veeam Backup for Azure)

    Code: Select all

    > Get-VBRAzureComputeBackup
    Name             Id                                  
    ----              --                                  
    Policy A        93ee773f-3eea-483d-bd1e-5eeadb8e6284
    VM-1 Backup      3c423d7e-48a0-4e1a-be7f-94b5c2c84ad1
    To use this for command Add-VBRBackupCopyJob, we can only use the Policy one,
    otherwise it will raise this error: "Specified backup type is not supported (expected platforms: GCE, Azure IaaS, AWS EC2; expected type: VmbApiPolicyTempJob)"
I am curruently facing with another error with Get-VBRExternalRepository

Code: Select all

Get-VBRExternalRepository : The specified external repository type is invalid: {F2EA0591-524A-4F48-9138-3809F4A5112C}
At line:1 char:1
+ Get-VBRExternalRepository
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VBRExternalRepository], Exception
    + FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.GetVBRExternalRepository
There are 2 external repository types in my VBR: "MS Azure Blob Storage" and "MS Azure Archive Storage",
It maybe an issue with my VBR version 12, do you have any suggestion to fix this?

Thanks
Mildur
Product Manager
Posts: 9822
Liked: 2597 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Get-VBRAzureComputeBackup and Add-VBRBackupCopyJob for Azure backup

Post by Mildur »

Thanks for the update.
I can see the same issue in my lab with the archive repository. I will report it internally.

Best,
Fabian
Product Management Analyst @ Veeam Software
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 669 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get-VBRAzureComputeBackup and Add-VBRBackupCopyJob for Azure backup

Post by oleg.feoktistov »

Hi @dquang,

Did you happen to add your "MS Azure Archive Storage" as external one through "Add Repository" feature rather than with "Connect to Repository"?


Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests