RESTful knowledge exchange
Post Reply
Erwin Linker
Service Provider
Posts: 37
Liked: 3 times
Joined: Mar 30, 2016 12:58 pm
Full Name: Erwin Linker
Contact:

Question about backupTaskSession (Case # 04394506)

Post by Erwin Linker »

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.

Erwin Linker
Service Provider
Posts: 37
Liked: 3 times
Joined: Mar 30, 2016 12:58 pm
Full Name: Erwin Linker
Contact:

Re: Question about backupTaskSession (Case # 04394506)

Post by Erwin Linker »

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.

chris.arceneaux
Veeam Software
Posts: 294
Liked: 151 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Kentucky, USA
Contact:

Re: Question about backupTaskSession (Case # 04394506)

Post by chris.arceneaux » 1 person likes this post

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:
Erwin 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
Job Status
Current Restore Points
Storage Usage
  • 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
Hope this helps!
Chris

Erwin Linker
Service Provider
Posts: 37
Liked: 3 times
Joined: Mar 30, 2016 12:58 pm
Full Name: Erwin Linker
Contact:

Re: Question about backupTaskSession (Case # 04394506)

Post by Erwin Linker »

Hi Chris,

Thanks for the answers, i have send a mail to our devops team with the information! (y)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest