Hi all,
We have a case at Veeam about the backupTasksession and reference to the restorepoint.
When a back-up job is successful at the first try we don't have a issue but when the first try fails and the job does a retry for that VM we are missing information from the API.
Example:
- A job runs normal but 1 VM fails.
- The VM is successful in the retry.
We use the following API calls:
GET https://APIurl:9398/api/query?type=Back ... me==VMName
GET https://APIurl:9398/api/backupTaskSessi ... mat=Entity
GET https://APIurl:9398/api/backupSessions/ ... mat=Entity
GET https://APIurl:9398/api/query?type=VmRe ... ePointName"
The first sessions doens't have a reference to retry session, so the status is failed. But in fact the retry was succesfull but we don't have a reference to that point.
Has anybody a idea what the best methode is to get a good reference to a retry session.
-
- Service Provider
- Posts: 125
- Liked: 11 times
- Joined: Mar 30, 2016 12:58 pm
- Full Name: Erwin Linker
- Location: The Netherlands
- Contact:
-
- Service Provider
- Posts: 125
- Liked: 11 times
- Joined: Mar 30, 2016 12:58 pm
- Full Name: Erwin Linker
- Location: The Netherlands
- Contact:
Re: Question about backupTaskSession (Case # 04394506)
A bit more information from our devops team:
In our system we got a list of virtualMachines that are being backuped up, and we use the follow API call to get the backupTaskSessions:
GET https://APUurl:9443/api/query?type=Back ... ==MyVmName
Now the data we want is the following:
- for every virtualMachine a list of backups
-- for every backup the state
-- for every backup the result
-- for every backup the size of the backup
-- for every backup with success state, the reference to the vmRestorePoint (to retrieve backupSize using the backupFileEntity, and to get a reference for restoring a backup).
- for every virtualMachine the size of all non-expired backups
We are using the totalSize for billing our customers.
The problem we're currently facing is that the "sync"-jobs that are used to sync data to BackupCopy jobs are also listed as Success, without a reference to the BackupFile. So practically, for us there is no difference between are Retry job (after a job has failed), and a job that sync the data to the BackupCopy. They both dont have a vmRestorePoint, and they both have the state Success.
Maybe the way we do things differs from the idea that Veeam wants us to use it. Thats why you maybe can give us more information about how to retrieve the data listed above.
Our current backup model looks like this. I think the used variable names speak for themselves:
{
"_id" : ObjectId("5f6d5f40d0a9b027e9561287"),
"state" : "SUCCESS",
"backendRef" : "urn:veeam:BackupTaskSession:db617f51-be85-4a9f-bf51-8f520958cf5d",
"date" : ISODate("2020-09-24T20:18:25.043+0000"),
"backupSize" : NumberLong(576389120),
"totalSize" : NumberLong(20435763200)
}
We use the backendRef to restore a virtualMachine.
In our system we got a list of virtualMachines that are being backuped up, and we use the follow API call to get the backupTaskSessions:
GET https://APUurl:9443/api/query?type=Back ... ==MyVmName
Now the data we want is the following:
- for every virtualMachine a list of backups
-- for every backup the state
-- for every backup the result
-- for every backup the size of the backup
-- for every backup with success state, the reference to the vmRestorePoint (to retrieve backupSize using the backupFileEntity, and to get a reference for restoring a backup).
- for every virtualMachine the size of all non-expired backups
We are using the totalSize for billing our customers.
The problem we're currently facing is that the "sync"-jobs that are used to sync data to BackupCopy jobs are also listed as Success, without a reference to the BackupFile. So practically, for us there is no difference between are Retry job (after a job has failed), and a job that sync the data to the BackupCopy. They both dont have a vmRestorePoint, and they both have the state Success.
Maybe the way we do things differs from the idea that Veeam wants us to use it. Thats why you maybe can give us more information about how to retrieve the data listed above.
Our current backup model looks like this. I think the used variable names speak for themselves:
{
"_id" : ObjectId("5f6d5f40d0a9b027e9561287"),
"state" : "SUCCESS",
"backendRef" : "urn:veeam:BackupTaskSession:db617f51-be85-4a9f-bf51-8f520958cf5d",
"date" : ISODate("2020-09-24T20:18:25.043+0000"),
"backupSize" : NumberLong(576389120),
"totalSize" : NumberLong(20435763200)
}
We use the backendRef to restore a virtualMachine.
-
- VeeaMVP
- Posts: 695
- Liked: 374 times
- Joined: Jun 24, 2019 1:39 pm
- Full Name: Chris Arceneaux
- Location: Georgia, USA
- Contact:
Re: Question about backupTaskSession (Case # 04394506)
Hi Erwin,
Thanks for the detail. It seems like some of this information is used for billing purposes and some is used for monitoring/restoring information. Here's how I would proceed with gathering the information you're looking for:
Chris
Thanks for the detail. It seems like some of this information is used for billing purposes and some is used for monitoring/restoring information. Here's how I would proceed with gathering the information you're looking for:
Job StatusErwin Linker wrote: - for every virtualMachine a list of backups
-- for every backup the state
-- for every backup the result
-- for every backup the size of the backup
-- for every backup with success state, the reference to the vmRestorePoint (to retrieve backupSize using the backupFileEntity, and to get a reference for restoring a backup).
- for every virtualMachine the size of all non-expired backups
- Retrieve Backup Jobs
- Retrieve Backup Sessions
- GET /api/query?format=Entities&sortDesc=CreationTime&type=BackupJobSession
- Sorted Newest to Oldest
- JobUid ties the Backup Session --> Job
- The most recent session will provide you with the current state of the Backup Job.
- Retrieve Backups Task Sessions
- GET /api/query?format=Entities&sortDesc=CreationTime&type=BackupTaskSession
- Sorted Newest to Oldest
- Here's where you're getting to the VM-level. VmUid is the unique ID for a specific VM. Much better than using VM Name.
- JobSessionUid ties the Backup Task Session --> Backup Session --> Job
- Retrieve VM Restore Points
- GET /api/vmRestorePoints
- GET /api/query?format=Entities&type=VmRestorePoint&filter=HierarchyObjRef=="VmUid"
- Previous API call will show you all Restore Points for the specified VM.
- Both API calls show only current/existing Restore Points
- Retrieve Backups
- GET /api/backups
- Match Backup Name with Job Name
- Note there are also links in this response to find corresponding Restore Points & Backup Files contained in this backup.
- Retrieve Backup Files
- GET /api/backupFiles?format=Entity
- Backup files are the actual files residing on your storage. So here is the storage usage data you're looking for.
- If the repository is set to use per-VM backup files, there will be a file for each VM Restore Point. Otherwise, there will be a file for each successful backup session and the file will contain VM Restore Points for all VMs backed up in the job.
- BackupSize is size of the backup on disk
- Link Type="BackupReference" ties the Backup File --> Backup --> Job
Chris
-
- Service Provider
- Posts: 125
- Liked: 11 times
- Joined: Mar 30, 2016 12:58 pm
- Full Name: Erwin Linker
- Location: The Netherlands
- Contact:
Re: Question about backupTaskSession (Case # 04394506)
Hi Chris,
Thanks for the answers, i have send a mail to our devops team with the information! (y)
Thanks for the answers, i have send a mail to our devops team with the information! (y)
Who is online
Users browsing this forum: No registered users and 2 guests