Hi
We have a couple of custom scripts running to help us safe time and make sure we do not miss issues.
One of the scripts checks though our v-center at list all the vms. Then it checks if the vms in our v-center have a restorepoint in both a normal backup job and a copy job.
The issue is that after upgrading to v10 we have slowly started to change our copy jobs to use the immediate setting.The issue is that the way the new jobs work we cannot pull restorepoint info the same way.
This is how we used to get the restorepoints:
Get-VBRBackup | Where TypeToString -eq "Vmware Backup Copy" | Get-VBRRestorePoint | select name
I have found a way to get the restorepoints from the new job. issue is that i need a automated way to do it.
So if i want to pull the restorepoints the command is:
Get-VBRRestorePoint -Backup "NameOfCopyJobName\NameOfBackupJob"
I could create the naming so that copy and backup jobs are the same, but this is not something that will give a good end result.
So the best i can think is to somehow pull the NameOfBackupJob from the copy job somehow, so that i can use the name in the restorepoint get command.
Hope that someone knows how or know a other way to pull the data.
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Feb 27, 2019 7:47 am
- Contact:
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Issue with custom script after setting up Copy Immediate job
Hi and Welcome to the Community Forums!
Due to the Backup Copy immediate mode specifics, powershell returns objects with two job types for such jobs - SimpleBackupCopyPolicy and SimpleBackupCopyWorker.
Objects with SimpleBackupCopyPolicy job type contain general information about the job/session or backup cached for the last 24 hours.
Objects with SimpleBackupCopyWorker job type are child ones and contain information for each job run.
That being said, you need to get restore points for backups with SimpleBackupCopyWorker job type to make it work:
Or
Thanks,
Oleg
Due to the Backup Copy immediate mode specifics, powershell returns objects with two job types for such jobs - SimpleBackupCopyPolicy and SimpleBackupCopyWorker.
Objects with SimpleBackupCopyPolicy job type contain general information about the job/session or backup cached for the last 24 hours.
Objects with SimpleBackupCopyWorker job type are child ones and contain information for each job run.
That being said, you need to get restore points for backups with SimpleBackupCopyWorker job type to make it work:
Code: Select all
$backup = Get-VBRBackup | where {$_.JobType -eq 'SimpleBackupCopyWorker'}
Code: Select all
$backup = Get-VBRBackup | where {$_.TypeToString -eq 'Backup Copy'}
Oleg
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Feb 27, 2019 7:47 am
- Contact:
Re: Issue with custom script after setting up Copy Immediate job
Hi Oleg
Thanks that was just what i was looking for!
Thanks that was just what i was looking for!
Who is online
Users browsing this forum: Google [Bot] and 4 guests