Comprehensive data protection for all workloads
Post Reply
mboussoffara
Novice
Posts: 4
Liked: never
Joined: Sep 17, 2025 9:57 am
Full Name: M. Boussoffara
Contact:

Where to find logs for Backup Copy jobs in the Veeam database?

Post by mboussoffara »

I've successfully traced the logs for standard Backup Jobs (Jobs -> Backup) in the Veeam database, but I'm unable to find the equivalent logs for Backup Copy Jobs (Jobs -> Backup Copy). The UI shows the logs, so they must be stored somewhere.

For standard Backup jobs, I can trace the logs through these steps:

1. Get the job session from backup.model.jobsessions table:

Code: Select all

    SELECT * 
    FROM public."backup.model.jobsessions" 
    WHERE job_id = '15fb7c09-b44e-4a76-922f-d58f8ef5465cb';
2. Use that session ID to find backup job sessions in backup.model.backupjobsessions table:

Code: Select all

    SELECT * 
    FROM public."backup.model.backupjobsessions" 
    WHERE id = '0f8ab259-bef8-4f66-bf80-b76201e6b0f8';
3. From there, get backup task sessions in backup.model.backuptasksessions table:

Code: Select all

    SELECT * 
    FROM public."backup.model.backuptasksessions" 
    WHERE session_id = '0f8ab259-bef8-4f66-bf80-b76201e6b0f8';
4. Finally, retrieve the logs for each task session from sessionlog table:

Code: Select all

    SELECT * 
    FROM public."sessionlog" 
    WHERE sessionid = '9eb9a25b-0ee0-445b-b5ef-8adb05553a26';
This works fine for Backup jobs.

However, when I try to do the same for Backup Copy jobs (type=65), I cannot find any related logs. Even searching directly in sessionlog table by title doesn’t return anything, exp:

Code: Select all

    SELECT * 
    FROM public."sessionlog" 
    WHERE title ILIKE '%copy%';
In the Veeam UI, I clearly see logs for Backup Copy jobs, but I cannot locate them in the database.

👉 Question: Where are the logs for Backup Copy jobs stored in the Veeam database, and how can I retrieve them? Are they stored in a different table or schema, or is there a different process for accessing them?
PetrM
Veeam Software
Posts: 3953
Liked: 677 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: Where to find logs for Backup Copy jobs in the Veeam database?

Post by PetrM » 1 person likes this post

Hello and Welcome to Veeam R&D Forums!

Please note that any manual actions or queries against the Veeam configuration database are not supported and should only be performed by our support team for troubleshooting purposes.

Could you please elaborate a bit more on what problem you are trying to solve by retrieving these logs from the configuration database?

Thanks!
mboussoffara
Novice
Posts: 4
Liked: never
Joined: Sep 17, 2025 9:57 am
Full Name: M. Boussoffara
Contact:

Re: Where to find logs for Backup Copy jobs in the Veeam database?

Post by mboussoffara »

Hello,

Thank you for the welcome and the important reminder regarding database supportability. I understand that direct database queries are unsupported and carry risks, which is why we are proceeding with caution.

To clarify my use case:
- This is not related to a support issue or troubleshooting, but rather a design/usage question.
- The requirement is not to modify or update anything in the Veeam configuration database.
- I would like to understand if there is any supported way (direct query, documented schema, or export mechanism) to access the same backup copy job session details that appear under Jobs → Backup Copy → (double-click a job), for the purpose of persisting them into another application that consolidates job statuses and overviews.

We are aware of the PowerShell and REST API options, but our integration design prefers a direct read-only method if there is a supported approach.

Could you please confirm whether such a supported method exists, or if API/PowerShell are the only officially supported options?
mboussoffara
Novice
Posts: 4
Liked: never
Joined: Sep 17, 2025 9:57 am
Full Name: M. Boussoffara
Contact:

Re: Where to find logs for Backup Copy jobs in the Veeam database?

Post by mboussoffara »

Hello, Thank you for the welcome and the important reminder regarding database supportability. I understand that direct database queries are unsupported and carry risks, which is why we are proceeding with caution.

To clarify my use case:
- The requirement is not to modify or update anything in the Veeam configuration database.
- What I am looking for is a way to read the same backup copy job session details that I can see under Jobs → Backup Copy → (double-click a job), and persist all informations into another internal application that provides a consolidated overview of Veeam jobs and statuses.
- I already have access to the SQL Server instance where the Veeam configuration database resides, and my idea was to fetch those details directly for reporting purposes.

While we are aware of the PowerShell and REST API options, our architectural decision for this integration prefer not to introduce additional components or dependencies and requires a direct, read-only query against the configuration database to persist this specific data into our application's database.

Is there perhaps any supported way (direct query, documented schema, or export mechanism) to access this data for reporting, without relying on PowerShell or the REST API? This is not a support case but rather a design/usage question.

I would like to understand if there’s any supported way to retrieve backup copy job session details (the same as visible in the UI) directly from the database.
PetrM
Veeam Software
Posts: 3953
Liked: 677 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: Where to find logs for Backup Copy jobs in the Veeam database?

Post by PetrM »

Hello,

Many thanks for clarifying your use case. Exactly, REST API and PowerShell are the only officially supported options.

Thanks!
mboussoffara
Novice
Posts: 4
Liked: never
Joined: Sep 17, 2025 9:57 am
Full Name: M. Boussoffara
Contact:

Re: Where to find logs for Backup Copy jobs in the Veeam database?

Post by mboussoffara »

Thank you for the clarification. I understand that REST API and PowerShell are the supported options, however my concern is that they primarily provide details for standard backup jobs (as visible under Jobs → Backup).

In our case, we also rely on Backup Copy jobs, where the UI shows distinct session information and detailed logs (accessible when double-clicking a Backup Copy job).

My remaining challenge is that I have not found a way to retrieve the same level of session task details or logs for Backup Copy jobs through the supported methods !!!
oleg.feoktistov
Veeam Software
Posts: 2035
Liked: 678 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Where to find logs for Backup Copy jobs in the Veeam database?

Post by oleg.feoktistov » 1 person likes this post

Hi @mboussoffara,

Not a 100% supported Powershell way (still uses some of the unsupported .NET methods), but still might be more convenient than querying the database for task session logs directly:

Code: Select all

$job = Get-VBRJob -Name 'Backup Copy Job 1'
$workers = $job.GetWorkerJobs()
$sessions = Get-VBRBackupSession
foreach ($worker in $workers) {
  $workerSessions = $sessions | where {$_.JobId -eq $worker.Id}
  foreach ($session in $workerSessions) {
      $taskSessions = Get-VBRTaskSession -Session $session
      foreach ($taskSession in $taskSessions) {
        $log = $taskSession.Logger.GetLog().UpdatedRecords
        $log
    }
  }
}
As for REST API, in v13 we supported backup copy jobs, but I will need to double check if backup sessions and task sessions endpoints now work with them as well.

Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], ashleyw and 52 guests