I'm trying to do a test restore with PowerShell, and it's working as long as the Backup name is the same as the Job name.
There are several servers where someone has changed the Job name, and the Backup name hasn't changed.
Method:
Get Job names with Get-VBRJob
Randomly select a Job
Get VMs in Job
Randomly select a VM
Do the restore - I need the Backup name for this, and can't match a Backup to a Job if they're different.
Is there a way of figuring out the Backup name that's attached to a Job?
-
- Lurker
- Posts: 2
- Liked: never
- Joined: May 21, 2021 8:51 am
- Full Name: Duane Godwin
- Contact:
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Get Backup name when Job name has changed
Hi Duane and welcome to the forums!
Even if the name has changed, job id stays the same. So just get job id and then filter backups by it:
Thanks,
Oleg
Even if the name has changed, job id stays the same. So just get job id and then filter backups by it:
Code: Select all
$job = Get-VBRJob -Name 'Backup Job'
$backup = Get-VBRBackup | where {$_.JobId -eq $job.Id}
Oleg
-
- Lurker
- Posts: 2
- Liked: never
- Joined: May 21, 2021 8:51 am
- Full Name: Duane Godwin
- Contact:
Re: Get Backup name when Job name has changed
Hi Oleg, thanks for the quick and excellent response. This works perfectly.
Just a note from browsing various posts over the last few days - the quality of responses in this forum is outstanding.
Just a note from browsing various posts over the last few days - the quality of responses in this forum is outstanding.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Get Backup name when Job name has changed
Glad we could help you!
Who is online
Users browsing this forum: No registered users and 9 guests