PowerShell script exchange
Post Reply
gekken
Novice
Posts: 7
Liked: 3 times
Joined: Jun 18, 2013 9:48 am
Full Name: Geir Kåre Sjo

Veeam 11 rescan/resync of repositories

Post by gekken »

hi

I have a setup where I copy backups from one environment to another. In the destination environment I have a scripted solution to bring up VMs using "Instant Recovery".

For Veeam B&R 9.5 this was simple after new files is copied "get-VBRBackupRepository - name Repo | rescan-VBREntity" did the trick. For Veeam B&R 11 this is different. The command runs without any errors/messages, but nothing is updated in the database. I also tried "get-VBRBackupRepository - name Repo | Sync-VBRBackupRepository", but still a no-go.

However if I from GUI initiates a rescan everything is fine.

Anyone seen similar behavior?

/GK
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Veeam 11 rescan/resync of repositories

Post by Mildur »

Hi Geir

Looks like a technical issue, if rescanning in the VBR Console updates the database, but the PowerShell command doesn't do it.
Can you open a support case and provide us with the case number? Thanks you very much.

Any reason, why you don't use SureBackup or Instant Recovery directly from the primary server?

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

Re: Veeam 11 rescan/resync of repositories

Post by oleg.feoktistov »

Hi Geir,

Checked in my lab both with v11 and v11a VBR servers, all went ok through Powershell, backups added under Backups (Imported) node. Do you see the corresponding Configuration Database Resynchronize session under History > System node upon running Rescan-VBREntity cmdlet? Does it say in the session log upon successful execution that some backups were added during resync process? For instance, "Default Backup Repository: added 1 unencrypted, skipped 1".


Thanks,
Oleg
gekken
Novice
Posts: 7
Liked: 3 times
Joined: Jun 18, 2013 9:48 am
Full Name: Geir Kåre Sjo

Re: Veeam 11 rescan/resync of repositories

Post by gekken »

Hi Oleg

Thank you so much for testing this. This script I was using is copied, from 9.5 enviroment, where the setup should be 100% the same. Only problem was that the repository names where different, eg 50RepoForImport vs RepoForImport50. And since the get-VBRBackupRepository silently accepts that I was getting a non-existing repository I was not able to catch this error until you confirmed the the function to be good. I just wrongly tried to blame Veeam :). I will try to not do that in the future :D

Regards GK
gekken
Novice
Posts: 7
Liked: 3 times
Joined: Jun 18, 2013 9:48 am
Full Name: Geir Kåre Sjo

Re: Veeam 11 rescan/resync of repositories

Post by gekken »

Mildur wrote: Aug 11, 2022 12:13 pm Hi Geir

Looks like a technical issue, if rescanning in the VBR Console updates the database, but the PowerShell command doesn't do it.
Can you open a support case and provide us with the case number? Thanks you very much.

Any reason, why you don't use SureBackup or Instant Recovery directly from the primary server?

Thanks
Fabian

Hi Fabian, thank you for you reply

As you can see in previous post the only one to blame is myself :). To answer you question, the backups are copied from one highsecurity zone to an auxiliary zone where VMs are booted up for compliance scanning, patch testing and more. As you probably know Surebackup/vLAB can not handle backups not actively performed by the server it self. If you could add this functionality to later versions that would be great.

/GK
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Veeam 11 rescan/resync of repositories

Post by oleg.feoktistov » 1 person likes this post

Hi Geir,

Glad you figured it out! As for Get-VBRBackupRepository returning nothing if a repository with the passed name was not found - it might be worth adding an error handler to throw an exception specifically in case the variable intended for keeping repositories is null.

Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests