public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH 0/7] client: add scheduled backup jobs
Date: Wed, 14 Oct 2026 12:51:29 +0200	[thread overview]
Message-ID: <20261014105208.2747208-1-t.lamprecht@proxmox.com> (raw)

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





             reply	other threads:[~2026-10-21 20:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 10:51 Thomas Lamprecht [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261014105208.2747208-1-t.lamprecht@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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