A systemd-based solution for scheduling Veeam backup jobs on Linux systems
Find a file
Christopher Perrin f773aa4d9b Initial Commit
2026-01-28 22:16:47 +01:00
README.md Initial Commit 2026-01-28 22:16:47 +01:00
veeam-run-polling Initial Commit 2026-01-28 22:16:47 +01:00
veeam-run@.service Initial Commit 2026-01-28 22:16:47 +01:00
veeam-run@.timer Initial Commit 2026-01-28 22:16:47 +01:00

Veeam Systemd Integration

A systemd-based solution for scheduling Veeam backup jobs on Linux systems.

Components

veeam-run-polling

A bash script that:

  1. Starts a Veeam backup job by name
  2. Extracts the session ID from the output
  3. Polls the job status at regular intervals (10 seconds)
  4. Gracefully handles stop signals
  5. Reports job completion status (Success, Warning, or Failed)

veeam-run@.service

A systemd service template that:

  • Executes the polling script with a specific job name
  • Uses systemd-inhibit to prevent system sleep during backups

veeam-run@.timer

A systemd timer template that:

  • Schedules backups to run on the every second day of the month at 10:30 AM
  • Persists the schedule across system reboots
  • Wakes the system to run the scheduled job

Prerequisites

  • Veeam Agent for Linux Free for Linux installed
  • Root/sudo access for installation
  • veeamconfig command-line tool available at /usr/bin/veeamconfig
  • A configured Veeam backup job without a schedule (the systemd timer will handle scheduling)

Installation

1. Copy the Polling Script

Copy the veeam-run-polling script to the system binaries directory:

sudo cp veeam-run-polling /usr/local/bin/
sudo chmod 755 /usr/local/bin/veeam-run-polling

2. Copy the Service Unit Files

Copy the systemd unit files:

sudo cp veeam-run@.service /etc/systemd/system/
sudo cp veeam-run@.timer /etc/systemd/system/

3. Reload Systemd Configuration

After copying the files, reload the systemd daemon:

sudo systemctl daemon-reload

4. Enable the Timer and Service

Enable the systemd timer and service for your backup job:

sudo systemctl enable veeam-run@<job_name>.timer
sudo systemctl enable veeam-run@<job_name>.service

Replace <job_name> with the actual name of your Veeam backup job.

Start the timer to activate scheduled backups:

sudo systemctl start veeam-run@<job_name>.timer