Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
Valle1975
Enthusiast
Posts: 32
Liked: 3 times
Joined: Aug 30, 2019 7:41 am
Full Name: Valerio
Contact:

How control backup job state by Batch for sending email on error

Post by Valle1975 »

Hi to Everyone.
I use Veeam agent Free Edition v. 3.0.2 combined with Veeam B&R 9.5 Up.4 (this one Licensed), so I can't upgrade to last 4.0 version, because requested V.BR v.10 with License.
I create a Single job on each Laptop by GUI configuration to Veeam repository, and now I want to launch this one by BATCH FILE, that made the backup and after shudown the Pc gracefully.

With this UNIQUE command I launch the backup, but I don't understand how can I control the backupjob state at the end of the backup.
Googling i find info about errorlevel function and Veeam Job state, but I don't know how configure it ERRORLEVEL command.
Here the sample batch the I want to use ...
Thanks for help.

Code: Select all

ECHO *** Begin Veeam Agent Backup Job *****
"C:\Program Files\Veeam\Endpoint Backup\Veeam.EndPoint.Manager.exe" /backup

IF %ERRORLEVEL% 0 GOTO BACKUP_OK
IF %ERRORLEVEL% -1 GOTO BACKUP_ERROR
IF %ERRORLEVEL% 5 GOTO BACKUP_ALREADY_STARTED


:BACKUP_OK
echo  **** Backup Effettuato Correttamente ****
GOTO END

:BACKUP_ERROR
echo  **** Il Backup ha Riscontrato dei problemi Bloccanti, Invio Email al SysAdmin ****
GOTO END

:BACKUP_ALREADY_STARTED
echo  **** Il Backup non è avviabile in quanto è già attivo un altro Jobs di Backup ****
GOTO END

:END
Dima P.
Product Manager
Posts: 14417
Liked: 1576 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: How control backup job state by Batch for sending email on error

Post by Dima P. »

Hello Valerio,

You can rely on the Windows events for any automation or data collection tasks. Here is the full list of windows events available for Veeam Agent for Windows. Cheers!
Valle1975
Enthusiast
Posts: 32
Liked: 3 times
Joined: Aug 30, 2019 7:41 am
Full Name: Valerio
Contact:

Re: How control backup job state by Batch for sending email on error

Post by Valle1975 »

Thanks for your answer, but If its possible, I prefer to manage the backup status by batch, because your solution request a task configuration on each laptop.
Instead with this unique batch file, I'm able to standardize this process and its notification.
thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests