PowerShell script exchange
Post Reply
real_tarantoga
Expert
Posts: 105
Liked: 22 times
Joined: Aug 20, 2009 12:32 pm
Location: Germany
Contact:

check absent secondary backup destination

Post by real_tarantoga »

Hello,
all our VBRJobs are automatically created by veeamPSSnapin Cmdlets. There is a manually created copy job (SimpleBackupCopyPolicy).
Now I need to identify, which newly created jobs are not linked to a secondary repository.
The aim will be to add these new jobs to the simplebackupcopy job (manually, because not all jobs should be duplicated to this target).

I'm not aware of the corresponding Joboptions value, where this information is stored.
Could anyone tell me for which "$job.sub.optionname" I have to look?

Thank you a lot in advance!
Stefan
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: check absent secondary backup destination

Post by oleg.feoktistov »

Hi,

I'm sorry, did you mean secondary repository or a linked job as a secondary target?
If you meant secondary repository, which job types you refer to?

Thanks!
real_tarantoga
Expert
Posts: 105
Liked: 22 times
Joined: Aug 20, 2009 12:32 pm
Location: Germany
Contact:

Re: check absent secondary backup destination

Post by real_tarantoga »

hello oleg!
i'm looking for a field/value where the second backup repository is stored or a value storing the information that a backup copy job is available.
so I can identify all backup jobs without a secondary backup destination (added while the backup copy job configuration).

Thank You!
Stefan
soncscy
Veteran
Posts: 643
Liked: 312 times
Joined: Aug 04, 2019 2:57 pm
Full Name: Harvey
Contact:

Re: check absent secondary backup destination

Post by soncscy » 1 person likes this post

Hi Stefan,

Maybe the others have a better way of doing this, but I see two ways.

1. Backup Jobs seem to have a LinkJobIDs property for Backup Copies and Tape jobs (though I'm not sure this works for Immediate, at least in my lab I couldn't seem to pull it). I suppose you'd pull these IDs, then diff the array of Backup Job IDs against the LinkedJobIDs.
2. A longer way would also be comparing Backups between the two, and find any jobs that seem to not have a backup copy counterpart.
real_tarantoga
Expert
Posts: 105
Liked: 22 times
Joined: Aug 20, 2009 12:32 pm
Location: Germany
Contact:

Re: check absent secondary backup destination

Post by real_tarantoga »

Thank you for Your repy!
That's what I hoped to find, but I'm not able to identify the value containing the information.
$job.LinkedJob(Id) is empty in the backup job and in the backup copy job as well.
Image
real_tarantoga
Expert
Posts: 105
Liked: 22 times
Joined: Aug 20, 2009 12:32 pm
Location: Germany
Contact:

Re: check absent secondary backup destination

Post by real_tarantoga » 1 person likes this post

Hello,
there is at minimum one solution for me in the veeam ONE reporting: "veeam backup assessment\VMs with no archive copy"; here are the VMs listed with their secondary repository. I didn't check all the reports for now. Perhaps there is another report, I will check them all over time ...
It would be nice to know, which option value stores this information, but as I need this only to add manually new jobs to the copy tasks, this is sufficient.

Thank you!
Stefan

Edit: as a german proverb says: sometimes you can not see the forest due to all the trees ...
the solution is really simple: the cmdlet compare-object gives me the difference between existing folder names on primary and secondary repository :roll:
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: check absent secondary backup destination

Post by oleg.feoktistov »

Glad you could sort it all out. Thanks!
Post Reply

Who is online

Users browsing this forum: masahide.k and 7 guests