-
- Influencer
- Posts: 18
- Liked: 2 times
- Joined: Aug 17, 2017 3:48 pm
- Full Name: Paul Winkeler
- Contact:
Retrieve sessions for Backup Copy Jobs
There does not appear to be a specific JobType for this and using 'BackupJobSession' as the Type for a job that has JobType ImmediateBackupCopy yields zero (0) results?! How do I retrieve the sessions of a ImmediateBackupCopy job?
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Hi Paul,
Are you talking about v11 or v11a?
Thanks,
Oleg
Are you talking about v11 or v11a?
Thanks,
Oleg
-
- Influencer
- Posts: 18
- Liked: 2 times
- Joined: Aug 17, 2017 3:48 pm
- Full Name: Paul Winkeler
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Hi Oleg - running version 11.0.1.1261 which I believe is plain Jane 11.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Paul,
It is v11a. Checked in my lab, sessions of ImmediateBackupCopy job type are showing up there. Could you, please, elaborate on the queries you send?
Thanks,
Oleg
It is v11a. Checked in my lab, sessions of ImmediateBackupCopy job type are showing up there. Could you, please, elaborate on the queries you send?
Thanks,
Oleg
-
- Influencer
- Posts: 18
- Liked: 2 times
- Joined: Aug 17, 2017 3:48 pm
- Full Name: Paul Winkeler
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Hi Oleg - I can try setting the JobType to ImmediateBackupCopy: note that that value is not listed as an option in the API documentation which is why I did not try it (yet). Thanks!
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Yes, that is what works with query service. GET /jobs/{id}/backupSessions on immediate backup copy jobs show sessions as well. Please give it a try and let me know. Meanwhile, I'll check with the documentation team. Thanks!
-
- Influencer
- Posts: 18
- Liked: 2 times
- Joined: Aug 17, 2017 3:48 pm
- Full Name: Paul Winkeler
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Ah wait, I am using the query service with this URL: query?type=BackupJobSession&format=entities&filter=JobName=="PowerSchool - Tuesday Group - Offsite";EndTime>="2022-06-14T13:45:18Z" where the job with that name is of type ImmediateBackupCopyJob and I get zero (0) results.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
I think I understand what is the issue. Due to the backup copy immediate mode's architecture, sessions of ImmediateBackupCopy job type don't have EndTime property set correctly (it is in the past - 1/1/1900 12:00:00 AM). Such sessions contain general data on backup copy job initialization and stats for the last 24 hours or so. To use EndTime filter for immediate backup copy mode, you need to query worker sessions (which actually have EndTime set correctly) instead. In the query type you are using rest service initiates search among all job types, but ends up with nothing because worker sessions have also their own naming convention: BackupCopyJobName\SourceJobName.
So there appears to be 2 ways to make your query work with EndTime.
Query by job name with job worker name convention:
Query by job type:
Or you can query ImmediateBackupCopy sessions omitting EndTime parameter.
Best regards,
Oleg
So there appears to be 2 ways to make your query work with EndTime.
Query by job name with job worker name convention:
Code: Select all
/query?type=BackupJobSession&format=entities&filter=JobName=="BackupCopyJob\SourceJob";EndTime>="2022-06-14T13:45:18Z"
Code: Select all
/query?type=BackupJobSession&format=entities&filter=JobType==ImmediateBackupCopyWorker;EndTime>="2022-06-14T13:45:18Z"
Or you can query ImmediateBackupCopy sessions omitting EndTime parameter.
Best regards,
Oleg
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
As for the job type list available in the helpcenter, I asked our documentation team to update the article on BackupJobSession query. Thanks!
-
- Influencer
- Posts: 18
- Liked: 2 times
- Joined: Aug 17, 2017 3:48 pm
- Full Name: Paul Winkeler
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Thanks for those insights Oleg; since I have several of these copy sessions in any 24 hour period I will try to narrow the query down by referencing the source job name. That'll be fun
I'll let you know of my success with that approach here.
I'll let you know of my success with that approach here.
-
- Influencer
- Posts: 18
- Liked: 2 times
- Joined: Aug 17, 2017 3:48 pm
- Full Name: Paul Winkeler
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Great news: appending the source job name onto the copy job name did the trick and I can now list the sessions for the copy job!
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Glad we figured it out. Best regards!
-
- Influencer
- Posts: 18
- Liked: 2 times
- Joined: Aug 17, 2017 3:48 pm
- Full Name: Paul Winkeler
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
As a follow up Oleg, what is the naming convention for replication sessions?
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retrieve sessions for Backup Copy Jobs
Hi Paul,
For replica sessions JobName value corresponds to the name of an associated replica job. No tricks here. You will need to use ReplicaJobSession query, though. Example:
If you are asking about replication session's name meaning the name of a single run, it's in the following format: JobName@datetime.
Example:
Best regards,
Oleg
For replica sessions JobName value corresponds to the name of an associated replica job. No tricks here. You will need to use ReplicaJobSession query, though. Example:
Code: Select all
/query?type=ReplicaJobSession&format=Entities&filter=JobName=="Replication Job 1"
Example:
Code: Select all
/query?type=ReplicaJobSession&format=Entities&filter=Name=="Replication Job 1@2022-03-18 16:31:15"
Oleg
Who is online
Users browsing this forum: No registered users and 1 guest