From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id BF3321FF0C0 for ; Wed, 21 Oct 2026 22:55:50 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1FF0C21617; Wed, 21 Oct 2026 22:55:47 +0200 (CEST) From: Thomas Lamprecht To: pbs-devel@lists.proxmox.com Subject: [PATCH 0/7] client: add scheduled backup jobs Date: Wed, 14 Oct 2026 12:51:29 +0200 Message-ID: <20261014105208.2747208-1-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792616141727 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.557 Adjusted score from AWL reputation of From: address DATE_IN_PAST_96_XX 2.07 Date: is 96 hours or more before Received: date DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: QAP3REYGS53PQCE3VVWKUZ4ZOQCFJUM7 X-Message-ID-Hash: QAP3REYGS53PQCE3VVWKUZ4ZOQCFJUM7 X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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