Standalone backup agents for Linux, Mac, AIX & Solaris workloads on-premises or in the public cloud
Post Reply
BostjanUNIJA
Service Provider
Posts: 126
Liked: 17 times
Joined: Apr 25, 2022 6:18 pm
Full Name: Bostjan UNIJA
Contact:

Mail notification on Linux Agent Standalone

Post by BostjanUNIJA »

Veeam Support - Case # 07811267

We are resolving situation where we need to use Linux Agent in a standalone mode.
Backup is now running fine, but we need to implement notification *at least on e-mail level*.
Support provided instructions to use "Pre-Freeze and Post-Thaw Scripts"
https://helpcenter.veeam.com/docs/agent ... ons&ver=60

Does anyone of you already have a prepared script for mail notification, so we don't create new ones.
rovshan.pashayev
Veeam Software
Posts: 641
Liked: 130 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: Mail notification on Linux Agent Standalone

Post by rovshan.pashayev »

Hello Bostjan,

You need to utilize the Pre-Job and Post-Job Scripts (--prejob and --postjob CLI options).
You can use the following command line in your postjob script:

Code: Select all

veeamconfig session info --id `veeamconfig session list | grep <Backup Job Name Here> | tail -n 1 | awk -F'[{}]' '{print $2}'`
Just replace <Backup Job Name Here> with the name of your backup job, and adjust the script so that it emails the output of this command.
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
BostjanUNIJA
Service Provider
Posts: 126
Liked: 17 times
Joined: Apr 25, 2022 6:18 pm
Full Name: Bostjan UNIJA
Contact:

Re: Mail notification on Linux Agent Standalone

Post by BostjanUNIJA »

Hi.
Thank you for your reply.
If I use your command above I receive:
Failed to convert [53d7952d-22ad-495b-b4dc-49d261270983~] to UUID.
BostjanUNIJA
Service Provider
Posts: 126
Liked: 17 times
Joined: Apr 25, 2022 6:18 pm
Full Name: Bostjan UNIJA
Contact:

Re: Mail notification on Linux Agent Standalone

Post by BostjanUNIJA »

My bad, it looks like I had unknown characther at the end: "~"
Ok I got an output now:
Backup session
ID: {53d7952d-22ad-495b-b4dc-49d261270983}
Job name: Daily-Backup
Job ID: {778d9686-f433-4870-b1f1-98d8d81f597d}
OIB ID: {d9853560-ff9a-419f-9fc9-cfcc201a2dad}
State: Success
Creation time: 2025-09-15 00:30:02
Start time: 2025-09-15 00:30:02
End time: 2025-09-15 00:33:52
Progress details:
Processed: 311.4 GB
Transferred: 525.5 MB
Retries details:
Attempt: #1 from 4
Is last attempt: true

How can I now work with this info to get sent an e-mail message about the success?
rovshan.pashayev
Veeam Software
Posts: 641
Liked: 130 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: Mail notification on Linux Agent Standalone

Post by rovshan.pashayev »

Hi,

You can adjust the example post-job script for your environment and try it.

Code: Select all

#!/bin/bash

# --- Configuration ---
EMAIL_TO="recipient@example.com"
EMAIL_FROM="server@example.com"
SMTP_SERVER="smtp.example.com"
BACKUP_JOB_NAME="YourBackupJobName"       # <-- Replace with your actual job name

# --- Get last session info ---
SESSION_INFO=$(veeamconfig session info --id $(veeamconfig session list | grep "$BACKUP_JOB_NAME" | tail -n 1 | awk -F'[{}]' '{print $2}'))

# --- Email subject and body ---
SUBJECT="Veeam Agent Backup Session Info for $BACKUP_JOB_NAME"

# --- Send the email ---
echo "$SESSION_INFO" | mailx -s "$SUBJECT" -r "$EMAIL_FROM" -S smtp="$SMTP_SERVER" "$EMAIL_TO"
But keep in mind that this is just a general example.
If you're still encountering technical issues, please continue working through the existing support case.
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
BostjanUNIJA
Service Provider
Posts: 126
Liked: 17 times
Joined: Apr 25, 2022 6:18 pm
Full Name: Bostjan UNIJA
Contact:

Re: Mail notification on Linux Agent Standalone

Post by BostjanUNIJA »

Hi.
Thank you for oyur rpely. We have managed to install postfix, create a script and added to the cronjob for daily reports.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests