Waiting for sync-vbrrepository

PowerShell script exchange

Waiting for sync-vbrrepository

Veeam Logoby tdewin » Thu Apr 02, 2015 5:22 pm

Hi,

It seems that sync-vbrrepository is an async call. Anyway to wait for it? I tried
Code: Select all
PS V:\scripts> $operation = Get-VBRBackupRepository -Name "Backup Repository 8" | Sync-VBRBackupRepository;while ($operation.isWorking) { write-host "..."}


I don't know how I can update $operation to reflect changes. With backup jobs there is get-vbrtasksession but it doesn't work with this one
tdewin
Veeam Software
 
Posts: 1043
Liked: 361 times
Joined: Fri Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin

Re: Waiting for sync-vbrrepository

Veeam Logoby v.Eremin » Fri Apr 03, 2015 11:55 am

What about using the following example?

Code: Select all
Get-VBRBackupRepository -Name "Name of repository" | Rescan-VBREntity -Wait


Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Waiting for sync-vbrrepository

Veeam Logoby tdewin » Fri Apr 03, 2015 3:35 pm

Thanks Vova, that seems exactly what I need ;)
tdewin
Veeam Software
 
Posts: 1043
Liked: 361 times
Joined: Fri Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin

Re: Waiting for sync-vbrrepository

Veeam Logoby v.Eremin » Fri Apr 03, 2015 3:49 pm

You're welcome. -Wait switch is designed specifically for the described use case, so, feel free to leverage it.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Waiting for sync-vbrrepository

Veeam Logoby scavern » Tue May 19, 2015 10:43 am

Just tagging onto this... is it possible to retrieve the date/time that the repository was last synced?
scavern
Novice
 
Posts: 7
Liked: never
Joined: Mon May 04, 2015 11:00 am

Re: Waiting for sync-vbrrepository

Veeam Logoby v.Eremin » Tue May 19, 2015 10:55 am

As far as I'm concerned, it's not possible to get this information via PS. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Waiting for sync-vbrrepository

Veeam Logoby scavern » Tue May 19, 2015 11:01 am

Is this information stored somewhere ? Log or database perhaps?
scavern
Novice
 
Posts: 7
Liked: never
Joined: Mon May 04, 2015 11:00 am

Re: Waiting for sync-vbrrepository

Veeam Logoby v.Eremin » Tue May 19, 2015 11:49 am

Most likely, this information is present inside the product database. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 2 guests