Small service that loops over Incus instances and performs sync and backup tasks on them.
Find a file
2025-01-05 10:34:14 +01:00
.gitea/workflows Initial commit 2025-01-05 10:34:14 +01:00
bin Initial commit 2025-01-05 10:34:14 +01:00
dummy Initial commit 2025-01-05 10:34:14 +01:00
http_notifier Initial commit 2025-01-05 10:34:14 +01:00
incus Initial commit 2025-01-05 10:34:14 +01:00
scheduler Initial commit 2025-01-05 10:34:14 +01:00
.gitignore Initial commit 2025-01-05 10:34:14 +01:00
go.mod Initial commit 2025-01-05 10:34:14 +01:00
go.sum Initial commit 2025-01-05 10:34:14 +01:00
main.go Initial commit 2025-01-05 10:34:14 +01:00
README.md Initial commit 2025-01-05 10:34:14 +01:00
Taskfile.yml Initial commit 2025-01-05 10:34:14 +01:00

Incus keeper

This project is covering backup and sync scenarios for Incus instances.

  • Backups instances into Restic repository
  • Syncs instances to another incus instance
  • Backs up incus itself

KV

Functions of Sentinel depends on user KV values configured on each instance. Here is what you can configure:

Key Default Purpose
user.backup false true/false, if true, regular backup job into Restic is performed
user.sync false true/false, if true, regular sync job into Restic is performed
user.backup-notify-url "" Call this URL when backup is done
user.sync-notify-url "" Call this URL when sync is done
user.backup-schedule 0 6 * * * Cron-like line for backup scheduling
user.sync-schedule 0 6 * * * Cron-like line for sync scheduling
user.sync-target-remote "" Sync's target host (needs to be configured in Incus)
user.sync-target-pool pool0 Target's storage pool
user.sync-target-instance-suffix -cold Instance name suffix at the target side

Important notes

Only one backup or sync job can run the same time. There is internal queue of jobs that is picked up one by one. Cli commands sync and backup are independent from this queue.

Restic needs two environment variables to be set:

  • RESTIC_PASSWORD
  • RESTIC_REPOSITORY