Proxmox Backup Server: Idle shutdown script

This one does what it says on the tin: Shut down the backup server when there are no more tasks running.

At first, I wanted to implement this as explained in this Proxmox forum tutorial. However, the hook scripts require SSH access from the PVE node to the backup server. I didn’t like this approach because I want to keep the backup server as separate as possible. So I went with polling the job list on the backup server itself instead.

This script is not affiliated with or approved by Proxmox Server Solutions GmbH! Use at your own risk. All rights reserved to their owners.

The script

Usage

Simply call the script regularly via crontab, systemd timer, …

The server will be shut down with a delay of 30 minutes. If there are new tasks started within this period, the pending shutdown will be canceled. Note: Because of the crontab polling frequency, it is possible to miss a task started in the last five minutes before the shutdown.

Tested with Proxmox Backup Server 9.0

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert