-
- 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
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.
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.
-
- 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
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:
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.
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}'`
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
-
- 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
Hi.
Thank you for your reply.
If I use your command above I receive:
Failed to convert [53d7952d-22ad-495b-b4dc-49d261270983~] to UUID.
Thank you for your reply.
If I use your command above I receive:
Failed to convert [53d7952d-22ad-495b-b4dc-49d261270983~] to UUID.
-
- 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
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?
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?
-
- 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
Hi,
You can adjust the example post-job script for your environment and try it.
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.
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"
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
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
-
- 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
Hi.
Thank you for oyur rpely. We have managed to install postfix, create a script and added to the cronjob for daily reports.
Thank you for oyur rpely. We have managed to install postfix, create a script and added to the cronjob for daily reports.
Who is online
Users browsing this forum: No registered users and 3 guests