PowerShell script exchange
Post Reply
matteu
Veeam Legend
Posts: 821
Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:

Seeding settings

Post by matteu »

Hello,

I don't find how to have seeding configuration from powershell in replica job.
I mean this picture show all what I want : https://helpcenter.veeam.com/docs/backu ... ml?ver=110

If seed is enabled for repository and wich one.
If mapping to a VM is enable and wich one.

I don't see anything in Get-vbrjob or get-vbrreplica
soncscy
Veteran
Posts: 643
Liked: 312 times
Joined: Aug 04, 2019 2:57 pm
Full Name: Harvey
Contact:

Re: Seeding settings

Post by soncscy »

Hey mattheu,

The $_.Info property of a Job object has the Initial Repository ID property which looks to correlate to the Repository used for Seeding. (it will be 0'd UUID if there is no seeding, or a repository ID if there is seeding that you can match with Get-VBRBackupRepository |Where-Object{$_.id -eq 'InitialRepositoryID you found'}. You can also use the GetInitialRepository() method it seems.

Mapping is a bit more challenging it looks. ViReplciaTargetOptions will tell you if mapping is used, but not info on what is mapped, and I cannot seem to find if it's stored in the CBackupJob class at all.

However, I did find a class that accepts a job.id as a parameter, CReplicaMapping:

[veeam.backup.core.CReplicaMapping]::Get($($Job.id))

Id : d56ea815-8f81-4830-bf6f-b6fc22591176
ObjId : cce6fe3b-c347-41b5-8cba-bbca0c686f06
MappedObjId : 6db2b8ba-cc94-470d-9fd0-da741cfedd84
Info : Veeam.Backup.Model.CDbReplicaMappingInfo
Obj : Name: Example-vm
MappedObj : Name: example-mapped-vm

So I guess you can use that.

Hope it helps!
matteu
Veeam Legend
Posts: 821
Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Seeding settings

Post by matteu »

Thanks for your answer, I try to test it today and I keep you informed :)
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests