vm-babysitter

vm-babysitter

Application Docker from Staffwerke GmbH's Repository

Vue d'ensemble

Automatic Backup & Monitoring utility for QEMU/KVM Virtual Machines (powered by Virtnbdbackup) Features: - Manages a list of *non-transient* domains defined in QEMU to be backed up regularly via internal cron task - Checks backup chains integrity of all listed domains, being able to detect inconsistencies and proceed accordingly (e.g. fixing, discarding, creating new ones, etc.) - Configurable backup rotation and retention policy - Ability to create a mirror and keep it updated with Rsync right after backup schedule or at configurable one, with independent retention policy - All main tasks (backup, sync, rotation/retention) can be performed manually by the user from inside the container - Pseudo-interactive tools for domain replication (to local and remote endpoints) and recovery from backups on the local host - Notify about backup chain and Rsync start and end of activities, as also when user intervention is required and about errors (Unraid feature) - Assume a different behavior when detects the server has been started recently, assuming the possibility of a previous crash, and therefore a more strict check of backup chains (Unraid feature)

Exigences

Unraid VM Manager Enabled

Arguments d'exécution

Réseau
host
Coquille
bash
Privilégié
false
Paramètres supplémentaires
--device /dev/fuse --cap-add SYS_ADMIN

Configuration du modèle

Time ZoneVariable

Set container to a desired timezone (usually same as this host)

Cible
TZ
Autostart DomainsVariable

Space separated list of domains that will be started along with the container if found powered off (case sensitive)

Cible
VM_AUTOSTART_LIST
Ignored DomainsVariable

Space separated list of domains to exclude from backup schedule and automatic checks (case sensitive)

Cible
VM_IGNORED_LIST
Backups Rotation (local)Variable

Backups rotation: Number of checkpoints to save incrmentally into a backup chain before to archive it. If set to `0`, backup chain will grow indefinitely (and no retention policies will be applied)

Cible
MAX_BACKUPS_PER_CHAIN
Défaut
30
Path for Backups (local)Pathrw

Path to user share where all backups will be stored

Cible
/backups
Défaut
/mnt/user/backups/domains
Backup ScheduleVariable

Cron expression to schedule incremental backups

Cible
BACKUP_SCHEDULE
Défaut
@daily
Retention Policy (local)Variable

Local retention policy: How many backup chains to keep archived at `LOCAL_BACKUP_PATH`. If set to `0`, disables retention policy on the local endpoint

Cible
LOCAL_BACKUP_CHAINS_TO_KEEP
Défaut
1
SSH KeyPathro

Path to private SSH key to perform operations onto remote servers via SSH and Rsync. Key must be owned by root and file permissions equal to '0600' (in most cases, necessary for send Unraid notifications)

Cible
/private/hostname.key
Défaut
/mnt/user/appdata/vm-babysitter/hostname.key
Unraid IP/HostnameVariable

Unraid IP/Hostname to send notifications (usually, same as this host). It has no effect on non-Unraid OS

Cible
UNRAID_NOTIFY_HOST
Défaut
localhost
Path for Backups (mirror)Variable

Usually, a SSH address to a path into another host, where backup chains will be mirrored. Requires r/w permissions at the remote host. If not set, this feature remains disabled and `RSYNC_` env vars have no effect. (Read documentation for advanced usage)

Cible
RSYNC_BACKUP_PATH
Rsync ScheduleVariable

When a cron expression is set, backup mirrors are updated at this specific schedule, instead of immediately after backups schedule

Cible
RSYNC_SCHEDULE
Retention Policy (mirror)Variable

Mirror's retention policy: How many backup chains to keep archived at `RSYNC_BACKUP_PATH`. If set to `0`, disables retention policy on the mirror

Cible
RSYNC_BACKUP_CHAINS_TO_KEEP
Défaut
2
Fix Backup Chains After Interrupted TasksVariable

Attempts to repair backup chains when virtnbdbackup was interrupted in the middle of an operation, by removing the last checkpoint at both backup and domain, avoiding thus a forced rotation and creation of a new backup chain. (Set a non-empty value to enable)

Cible
VM_ALLOW_BACKUP_CHAIN_FIX
Allow Automatic Powercycle of DomainsVariable

Performs controlled powercycle of running domains under certain scenarios during container startup. If not set, vm-babysitter will ask the user (via logs and Unraid notifications, when available) to manually shut down domains in need of this action. Read documentation for more info (Set a non-empty string to enable)

Cible
VM_ALLOW_POWERCYCLE
Check Backups Data IntegrityVariable

Verify data integrity of backups. This operation may take long time, delaying container's full initialization. Only useful under suspect of data corruption (Set a non-empty value to enable)

Cible
CHECK_BACKUPS_INTEGRITY
Domain Awaiting TimeoutVariable

Max amount in seconds scripts will await for domains responding to libvirt queries during powercycle operations. Increase this value if you get often warnings about scripts 'giving up' awaiting for slow domains

Cible
VM_WAIT_TIME
Défaut
60
Virtnbdbackup Extra ArgumentsVariable

Extra arguments passed to virtnbdbackup (only tested with `--start-domain`, `--compress` and `--no-color`. Other combinations usually lead to unexpected results

Cible
VIRTNBDBACKUP_ARGS
Rsync Extra ArgumentsVariable

Extra arguments passed to Rsync

Cible
RSYNC_ARGS
Défaut
-a
SSH OptionsVariable

Common SSH options for communications with remote, and the unraid hosts (expert use only)

Cible
SSH_OPTIONS
Défaut
-q -o IdentityFile=/private/hostname.key -o BatchMode=yes -o StrictHostKeyChecking=no -o ConnectTimeout=10
Internal Path for BackupsVariable

Container path where vm-babysitter will save and vm-restore will search for backups. Container will not start if not set, or if not mounted in r/w mode

Cible
LOCAL_BACKUP_PATH
Défaut
/backups
Path for Domain Disk ImagesPathrw

Change only if domain disk images are stored into a different user share than the default

Cible
/mnt/user/domains
Défaut
/mnt/user/domains
Main Path for LogsPathrw

Persistent bind mount for log files generated by scripts

Cible
/logs
Défaut
/mnt/user/appdata/vm-babysitter/logs
Internal Main Log PathVariable

Container path for the main log file

Cible
LOGFILE_PATH
Défaut
/logs/vm-babysitter.log
Internal Schedule Log PathVariable

Container path for scheduled tasks log file

Cible
SCHEDULE_LOGFILE_PATH
Défaut
/logs/scheduled-tasks.log
Internal Logrotate Config PathVariable

Container path to place and read log rotation config

Cible
LOGROTATE_CONFIG_PATH
Défaut
/tmp/logrotate.d/vm-babysitter
Logrotate ScheduleVariable

Cron expression to schedule internal logs rotation

Cible
LOGROTATE_SCHEDULE
Défaut
@daily
Logrotate SettingsVariable

Parsed string with *escaped* logrotate config to `LOGROTATE_CONFIG_PATH` during container (re)start

Cible
LOGROTATE_SETTINGS
Défaut
compress\n copytruncate\n daily\n dateext\n dateformat .%Y-%m-%d.%H:%M:%S\n missingok\n notifempty\n rotate 30
Virtnbdbackup SocketPathrw

Allows Virtnbdbackup to put its socket onto the main host

Cible
/var/tmp
Défaut
/var/tmp
Libvirt API SocketPathrw

Allow scripts to read and interact with Libvirt socket from inside the container

Cible
/run/libvirt
Défaut
/run/libvirt
Lock FolderPathrw

Allow scripts to put locks onto the main host

Cible
/run/lock
Défaut
/run/lock
Path to Nvram BinariesPathrw

Allow scripts to read/restore per domain nvram binaries for EFI/UEFI boot

Cible
/etc/libvirt/qemu/nvram
Défaut
/etc/libvirt/qemu/nvram
Path to OVMF BinariesPathro

Allow scripts to read/copy common nvram binaries for EFI/UEFI boot

Cible
/usr/share/qemu/ovmf-x64
Défaut
/usr/share/qemu/ovmf-x64

Catégories

Détails

Référentiel
ghcr.io/staffwerke/vm-babysitter
Dernière mise à jour2026-05-31
Première vue2024-11-23

Exécutez vm-babysitter sur Unraid.

vm-babysitter est listé dans Community Apps pour Unraid OS. Explorez Unraid pour créer un serveur domestique flexible, un NAS ou un laboratoire domestique.