Standalone backup agents for Linux, Mac, AIX & Solaris workloads on-premises or in the public cloud
Post Reply
GianlucaCroci
Expert
Posts: 237
Liked: 25 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Report for a backup job with agent of a Linux Power

Post by GianlucaCroci »

For a month we've implemented the backup of some servers with Linux on Power processor.
As type, compared to "Windows Agent Backup", "Linux Agent Backup", "IBM AIX Agent Backup", in this case it is "Linux Agent Policy".

I've set the job so that it warns me if the backup has not been completed successfully, therefore "Warning" or "Error".

However, I would like to receive a report (summary) once a week with the week's backups.

I tried with the command "Get-VBRJob | Where-Object { $_.Name -match "Linux Power Backup" })" where I can extract something but it isn't the status of the backup but of the application of the configuration on the servers.

How can I extract a list of all the backups, or rather of all the servers saved, by this backup policy, in a certain time range?

Thanks in advance for the help.
regards
rovshan.pashayev
Veeam Software
Posts: 569
Liked: 113 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: Report for a backup job with agent of a Linux Power

Post by rovshan.pashayev »

Hello Gianluca,

Let me check your scenario, and I will get back to you.
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
rovshan.pashayev
Veeam Software
Posts: 569
Liked: 113 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: Report for a backup job with agent of a Linux Power

Post by rovshan.pashayev »

Hello Gianluca,

Try following commands (all at once), which will output you name of machines, last creation time, and count of points.

Code: Select all

$job = Get-VBRComputerBackupJob -Name 'Linux Power Backup'
$backups = Get-VBRBackup | where {$_.JobId -eq $job.Id}
$rps = Get-VBRRestorePoint -Backup $backups
$report = @()
$rpsUnique = $rps | Select-Object -Property Name -Unique
foreach ($rp in $rpsUnique) {
  $counter = ($rps | where {$_.Name -eq $rp.Name}).Count
  $lastTime = ($rps | sort -Property CreationTime -Descending | select -First 1).CreationTime
  $report += $rp | select Name, @{n='LastCreationTime';e={$lastTime}}, @{n='Count';e={$counter}}
}

$report 
I believe you can adjust commands to suit your needs :)
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
GianlucaCroci
Expert
Posts: 237
Liked: 25 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: Report for a backup job with agent of a Linux Power

Post by GianlucaCroci »

Hello,
thanks a lot. very good.

it would be possible to have the last Status too? Because I just see the date and the numerb of backups... for each server
Name - LastCreationTime - Count
---- ---------------- -----
server_1 - 27.01.2025 03:30:28 - 16
server_2 - 27.01.2025 03:30:28 - 16
server_3 - 27.01.2025 03:30:28 - 16
server_4 - 27.01.2025 03:30:28 - 16
server_5 - 27.01.2025 03:30:28 - 16
Thanks again
rovshan.pashayev
Veeam Software
Posts: 569
Liked: 113 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: Report for a backup job with agent of a Linux Power

Post by rovshan.pashayev »

Hello Gianluca,

By "last status," do you mean the latest backup result of each machine?
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
GianlucaCroci
Expert
Posts: 237
Liked: 25 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: Report for a backup job with agent of a Linux Power

Post by GianlucaCroci »

Hello,

yes, true. So I can know if there was a Warning or Error.

Thanks
rovshan.pashayev
Veeam Software
Posts: 569
Liked: 113 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: Report for a backup job with agent of a Linux Power

Post by rovshan.pashayev »

Hello Gianluca,

Try following commands:

Code: Select all

$job = Get-VBRComputerBackupJob -Name 'Linux Power Backup'
$backups = Get-VBRBackup | where {$_.JobId -eq $job.Id}
$lastSession = Get-VBRComputerBackupJobSession | where {$_.JobId -eq $job.Id} | select -First 1
$rps = Get-VBRRestorePoint -Backup $backups
$report = @()
$rpsUnique = $rps | Select-Object -Property Name -Unique
foreach ($rp in $rpsUnique) {
  $counter = ($rps | where {$_.Name -eq $rp.Name}).Count
  $lastTime = ($rps | sort -Property CreationTime -Descending | select -First 1).CreationTime
  $report += $rp | select Name, @{n='LastCreationTime';e={$lastTime}}, @{n='Count';e={$counter}}, @{n='LastResult';e={$lastSession.Result}}
}

$report
Let us know the result.
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
GianlucaCroci
Expert
Posts: 237
Liked: 25 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: Report for a backup job with agent of a Linux Power

Post by GianlucaCroci »

Hello Rovshan,

work well, thanks a lot
Name LastCreationTime Count LastResult
---- ---------------- ----- ----------
server_1 04.02.2025 03:30:40 17 Success
server_2 04.02.2025 03:30:40 17 Success
server_3 04.02.2025 03:30:40 17 Success
server_4 04.02.2025 03:30:40 17 Success
server_5 04.02.2025 03:30:40 17 Success
Thanks again
Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests