duplicati_backup_status.ps1 - limehawk/rmm-scripts GitHub Wiki
duplicati_backup_status.ps1
Monitors Duplicati backup jobs via the local API.
Overview
Monitors Duplicati backup jobs via the local API. Authenticates to the Duplicati web service, queries configured backups, and reports their status including metrics like backup size, file count, and next scheduled run.
Purpose
Monitors Duplicati backup jobs via the local API. Authenticates to the Duplicati web service, queries configured backups, and reports their status including metrics like backup size, file count, and next scheduled run.
Prerequisites
- Windows OS
- Duplicati 2.0+ installed and running
- Web UI password set (or empty for no password)
Configuration
Required Inputs
$duplicatiPassword: Password for Duplicati Web UI (leave empty if no password)$duplicatiPort: Port where Duplicati runs (default 8200)
Behavior
- Validates input parameters
- Authenticates to Duplicati API
- Queries all configured backup jobs
- Checks status of each job (Success, Warning, Error, etc.)
- Reports metrics: size, file count, progress, next schedule
- Exits with code 1 if any job has failed
Security Notes
- Password is stored in script - modify per deployment
- No secrets logged to output
Exit Codes
- 0 = Success (all jobs healthy)
- 1 = Failure (service down or jobs failed)
Example Output
[ INPUT VALIDATION ]
--------------------------------------------------------------
Duplicati URL : http://localhost:8200
Inputs validated successfully
[ AUTHENTICATION ]
--------------------------------------------------------------
Authenticating to Duplicati API...
Authentication successful
[ BACKUP STATUS ]
--------------------------------------------------------------
Job: Daily Backup
Status : Success
Last Run : 2024-12-01 02:00
Size : 45.2 GB
Files : 125,432
Next : 2024-12-02 02:00
[ FINAL STATUS ]
--------------------------------------------------------------
Result : SUCCESS
All 1 backup job(s) healthy
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
Version History
- 2024-12-01 v1.0.0 - Initial release - migrated from SuperOps
Links
- View Script Source
- Scripts - Back to script index