public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH 0/7] client: add scheduled backup jobs
@ 2026-10-14 10:51 Thomas Lamprecht
  2026-10-14 10:51 ` [PATCH 1/7] client: backup specification: widen BackupDetectionMode derives Thomas Lamprecht
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Thomas Lamprecht @ 2026-10-14 10:51 UTC (permalink / raw)
  To: pbs-devel

This adds per-user backup jobs and a scheduler daemon to
proxmox-backup-client, so that a workstation or laptop can back itself
up on a schedule without a cron entry or systemd timer per job.

A config entry stores everything a backup job run needs: the repository, the
backup sources and options, where the password and key passphrase come from,
and an optional pre-run hook that can skip a run, for example on low
battery.
The new `job` subcommands manage the jobs in the user's XDG config
directory, `job run` runs one right away, and `job scheduler` acts as
daemon-process that runs jobs as they become due. The scheduler is meant
to run as the systemd user service that the package ships but does not
enable.

Like the server's jobs, a failed or interrupted run is not retried before
its next scheduled time. A retry policy could be added later though if it
turns out to be useful.

Thomas Lamprecht (7):
  client: backup specification: widen BackupDetectionMode derives
  client: job: add backup job config and state types
  client: job: add job runner and scheduled backup daemon
  client: job: add job management CLI subcommands
  client: job: ship systemd user unit for the scheduler
  client: job: add battery-check example pre-run hook
  docs: client: document scheduled backup jobs

 debian/proxmox-backup-client-static.examples |    1 +
 debian/proxmox-backup-client-static.install  |    1 +
 debian/proxmox-backup-client.examples        |    1 +
 debian/proxmox-backup-client.install         |    1 +
 debian/rules                                 |    5 +
 docs/backup-client.rst                       |  276 +++
 etc/proxmox-backup-client-scheduler.service  |   22 +
 examples/pbs-check-battery.sh                |   96 +
 pbs-client/Cargo.toml                        |    3 +-
 pbs-client/src/backup_specification.rs       |    2 +-
 pbs-client/src/client_job.rs                 | 1958 ++++++++++++++++++
 pbs-client/src/lib.rs                        |    1 +
 proxmox-backup-client/Cargo.toml             |    4 +-
 proxmox-backup-client/src/job/mod.rs         |  377 ++++
 proxmox-backup-client/src/job/runner.rs      |  712 +++++++
 proxmox-backup-client/src/job/scheduler.rs   |  695 +++++++
 proxmox-backup-client/src/main.rs            |    4 +-
 proxmox-backup-client/tests/job.rs           |  277 +++
 18 files changed, 4432 insertions(+), 4 deletions(-)
 create mode 100644 debian/proxmox-backup-client-static.examples
 create mode 100644 debian/proxmox-backup-client.examples
 create mode 100644 etc/proxmox-backup-client-scheduler.service
 create mode 100755 examples/pbs-check-battery.sh
 create mode 100644 pbs-client/src/client_job.rs
 create mode 100644 proxmox-backup-client/src/job/mod.rs
 create mode 100644 proxmox-backup-client/src/job/runner.rs
 create mode 100644 proxmox-backup-client/src/job/scheduler.rs
 create mode 100644 proxmox-backup-client/tests/job.rs

-- 
2.47.3





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-22 12:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 10:51 [PATCH 0/7] client: add scheduled backup jobs Thomas Lamprecht
2026-10-14 10:51 ` [PATCH 1/7] client: backup specification: widen BackupDetectionMode derives Thomas Lamprecht
2026-10-14 10:51 ` [PATCH 2/7] client: job: add backup job config and state types Thomas Lamprecht
2026-10-14 10:51 ` [PATCH 3/7] client: job: add job runner and scheduled backup daemon Thomas Lamprecht
2026-10-14 10:51 ` [PATCH 4/7] client: job: add job management CLI subcommands Thomas Lamprecht
2026-10-14 10:51 ` [PATCH 5/7] client: job: ship systemd user unit for the scheduler Thomas Lamprecht
2026-10-14 10:51 ` [PATCH 6/7] client: job: add battery-check example pre-run hook Thomas Lamprecht
2026-10-14 10:51 ` [PATCH 7/7] docs: client: document scheduled backup jobs Thomas Lamprecht
2026-10-22 12:58 ` [PATCH 0/7] client: add " Christian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal