Commit Graph

8509 Commits

Author SHA1 Message Date
Thomas Lamprecht
f176a0774d ui: update online help info map
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 07:56:25 +02:00
Thomas Lamprecht
ead4ec5d7e ui: do not show consent banner twice for OIDC login
We unconditionally showed the consent banner when constructing the
login view, but for an OIDC based authentication flow the user might
visit that view twice, once when first loading the UI and the second
one when getting redirected back by their OIDC provider.

Checking if there was such an OIDC redirect and skip showing the
banner in that cases avoids this issue.

Fix is similar in principle to what we do for pve-manager when closing
issue #6311 but replaces the if guard with a reverse early-return.

Report: https://bugzilla.proxmox.com/show_bug.cgi?id=6311
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 07:55:49 +02:00
Thomas Lamprecht
ac11a77580 buildsys: cleanup old target files before generating new ones
Avoids an rather annoying confirmation prompt from `mv` if it's OK to
move over the file if one calls these targets repeatedly, like during
development edit+install+test cycles.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 07:55:38 +02:00
Thomas Lamprecht
a740264063 bump version to 4.0.3-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-19 20:05:31 +02:00
Shannon Sterz
00ac201db7 docs: update apt key installation guide to use the new release key rings
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
Link: https://lore.proxmox.com/20250718091452.69458-1-s.sterz@proxmox.com
2025-07-19 20:01:23 +02:00
Thomas Lamprecht
7a5f194f00 pxar extract: linkat has no AT_SYMLINK_NOFOLLOW flag
This fixes extracting any pxar directory with a hardlink.

linkat defaults to not following symlinks for the olddir (source)
path, and only understands the `AT_SYMLINK_FOLLOW` (notice, there is
no "NO") and `AT_EMPTY_PATH` flags, as can be read in the linkat
man page.

The nix::unistd::LinkatFlags::NoSymlinkFollow flag was used here
previously with nix 0.26, but it was just a wrapper around the
AtFlags, but with NoSymlinkFollow resolving to AtFlags::empty() [0].
The nix 0.29 migration did a 1:1 translation from the now depracated
LinkatFlags to AtFlags, i.e. NoSymlinkFollow to AT_SYMLINK_FOLLOW,
which just cannot work for linkat, one must migrate to the empty
flags instead. That nix drops a safer type here seems a bit odd
though.

[0]: https://docs.rs/nix/0.26.1/src/nix/unistd.rs.html#1262-1263

Report: https://forum.proxmox.com/168633/
Fixes: 2a7012f96 ("update pbs-client to nix 0.29 and rustyline 0.14")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-19 20:00:14 +02:00
Shannon Sterz
cd23b5372f docs: update repository chapter to reflect new deb822 format
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
Link: https://lore.proxmox.com/20250717075330.53355-1-s.sterz@proxmox.com
2025-07-17 17:58:30 +02:00
Thomas Lamprecht
b19d2c393f bump version to 4.0.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-16 01:52:15 +02:00
Thomas Lamprecht
57d82fde86 d/postinst: fix version used for notification-mode update guard
This wasn't known at development time as it needs to be lesser than
the version this was first shipped with.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-16 01:52:15 +02:00
Thomas Lamprecht
8382d66513 docs: actually add pbs3to4 man page
Fixes: 11b1bd5bc ("build: Adapt from pbs2to3 to pbs3to4")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-16 01:52:15 +02:00
Christian Ebner
ae3994e003 garbage collection: track chunk cache stats and show in task log
Count the chunk cache hits and misses and display the resulting
values and the hit ratio in the garbage collection task log summary.

This allows to investigate possible issues and tune cache capacity,
also by being able to compare to other values in the summary such
as the on disk chunk count.

Exemplary output
```
2025-05-16T22:31:53+02:00: Chunk cache: hits 15817, misses 873 (hit ratio 94.77%)
2025-05-16T22:31:53+02:00: Removed garbage: 0 B
2025-05-16T22:31:53+02:00: Removed chunks: 0
2025-05-16T22:31:53+02:00: Original data usage: 64.961 GiB
2025-05-16T22:31:53+02:00: On-Disk usage: 1.037 GiB (1.60%)
2025-05-16T22:31:53+02:00: On-Disk chunks: 874
2025-05-16T22:31:53+02:00: Deduplication factor: 62.66
2025-05-16T22:31:53+02:00: Average chunk size: 1.215 MiB
```

Sidenote: the discrepancy between cache miss counter and on-disk
chunk count in the output shown above can be attributed to the all
zero chunk, inserted during the atime update check at the start of
garbage collection, however not being referenced by any index file in
this examplary case.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250604153449.482640-3-c.ebner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-16 01:52:15 +02:00
Lukas Wagner
f645974503 d/postinst: migrate notification mode default on update
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-5-l.wagner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-16 01:52:15 +02:00
Lukas Wagner
b289d294c8 ui: datastore options: notification: use radio controls to select mode
This makes it consistent with tape backup job options and PVE's backup
jobs. It also visualizes the dependency of 'notify' and 'notify-user'
onto 'notification-mode'.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-11-l.wagner@proxmox.com
2025-07-16 01:12:56 +02:00
Lukas Wagner
00290872a3 ui: datastore options: drop notify and notify-user rows
Even if the notification mode is set to 'notification-system', the
datastore options grid still shows the keys for 'Notify' and 'Notify
User', which have no effect in this mode:

        Notification:      [Use global notification settings]
        Notify:            [Prune: Default(always), etc...]
        Notify User:       [root@pam]

This is quite confusing.

Unfortunately, it seems be quite hard to dynamically disable/hide rows
in the grid panel used in this view.

For that reason these rows are removed completely for now. The options
are still visible when opening the edit window for the 'Notification'
row.

While this slightly worsens UX in some cases (information is hidden), it
improves clarity by reducing ambiguity, which is also a vital part of
good UX.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-10-l.wagner@proxmox.com
2025-07-16 01:12:56 +02:00
Lukas Wagner
0471464f4e ui: datastore options: notifications: use same jargon as tape-jobs and PVE
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-9-l.wagner@proxmox.com
2025-07-16 01:12:56 +02:00
Lukas Wagner
82963b7d4b ui: one-shot tape backup: use same wording as tape-backup jobs
Change the dialog of one-shot tape-backups in such a way that they use
the same jargon as scheduled tape backup jobs.

The width of the dialog is increased by 150px to 750px so that the
slightly larger amount of text fits nicely.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-8-l.wagner@proxmox.com
2025-07-16 01:12:56 +02:00
Lukas Wagner
025afdb9fe ui: tape backup job: move notification settings to a separate tab
For consistency, use the same UI approach as for PVE's backup jobs. Tape
backup jobs now gain a new tab for all notification related settings:

  ( ) Use global notification settings
  (x) Use sendmail to send an email (legacy)
      Recipient: [              ]

'Recipient' is disabled when the first radio control is selected.

The term 'Notification System' is altogether from the UI. It is not
necessarily clear to a user that this refers to the settings in
Configuration > Notifications.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-7-l.wagner@proxmox.com
2025-07-16 01:12:56 +02:00
Lukas Wagner
20053ec216 ui: datastore options view: switch to new notification-mode default
This default is displayed in the grid panel if the datastore config
retrieved from the API does not contain any value for notification-mode.
Since the default changed from 'legacy-sendmail' to 'notification-mode'
in the schema datatype, the defaultValue field needs to be adapted as
well.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-6-l.wagner@proxmox.com
2025-07-16 01:12:56 +02:00
Lukas Wagner
243e6a5784 cli: manager: add 'migrate-config default-notification-mode' command
This one migrates any datastore or tape backup job that relied on the
old default (legacy-sendmail) to an explicit setting of
legacy-sendmail. This allows us the change the default without changing
behavior for anybody.

This new command is intended to be called by d/postinst on upgrade to
the package version which introduces the new default value for
'notification-mode'.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-4-l.wagner@proxmox.com
2025-07-16 01:12:47 +02:00
Lukas Wagner
9526aee10a cli: manager: move update-to-prune-jobs command to new migrate-config sub-command
The new subcommand is introduced so that we have a common name space for
any config migration tasks which are triggered by d/postinst (or potentially
by hand).

No functional changes.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250623141315.288681-3-l.wagner@proxmox.com
2025-07-16 01:12:47 +02:00
Thomas Lamprecht
99129bbbd1 require pbs-api-types 1.0.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-16 01:00:45 +02:00
Christian Ebner
4cba26673d docs: rephrase and extend rate limiting description for sync jobs
Since commit 37a85cf6 ("fix: ui: sync job: edit rate limit based on
sync direction") rate limits for sync jobs can be correctly applied
for both directions. State this in the documentation and explicitley
mention the directions to reduce confusion.

Further, also mention the burst parameters, as they are not mentioned
at all.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250623124543.590388-1-c.ebner@proxmox.com
2025-07-16 00:14:55 +02:00
Lukas Wagner
fa89533da5 fixup Makefile and lintian-overrides for deb822 format sources file
These were forgotten in the original commit and unfortunately broke
`make deb`.

Fixes: 82a986ee67 ("update apt sources for Trixie based release and move to deb822 format")
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250714091001.132118-1-l.wagner@proxmox.com
2025-07-15 22:34:35 +02:00
Christian Ebner
11b1bd5bc0 build: Adapt from pbs2to3 to pbs3to4
Build and package the new version of the upgrade check binary,
ropping the no longer required old one.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250714101217.4178-1-c.ebner@proxmox.com
2025-07-15 22:20:03 +02:00
Lukas Wagner
74d3d6e9da proxmox-file-restore: allocate at least 256MB of RAM for the restore VM
The update from proxmox-backup-restore-image 0.7.0 -> 1.0.0 increased
the size of the initramfs image by couple of megabytes (~45 -> ~49),
making it too large to be successfully booted in a VM with 192MB of RAM.
This led to a "VM exited before connection could be established (500)"
error in the GUI when attempting to restore a single file,
while /var/log/proxmox-backup/file-restore/qemu.log reported the
following error:

  Initramfs unpacking failed: write error

As a stop-gap measure, the minimum RAM allocation is bumped to 256MB.

Since the amount of RAM is based on the number of disks, giving the VM
more memory if a large number of disks is associated with the backup
snapshot, this patch was also tested with 19, 20 and 25 disks as to
ensure that the remaining cases still work fine without a bump.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250715101907.303115-1-l.wagner@proxmox.com
2025-07-15 22:17:26 +02:00
Lukas Wagner
82a986ee67 update apt sources for Trixie based release and move to deb822 format
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250711091516.82731-1-l.wagner@proxmox.com
2025-07-11 11:17:31 +02:00
Thomas Lamprecht
a85a83dd4e bin: add pbs3to4 upgrade check-list script
Copied over pbs2to3 as base and did minimal adaptions to expected code
names and package and kernel versions, might need more work though.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-10 16:27:06 +02:00
Lukas Wagner
8eb1cd4a95 ui: utils: add missing task description override for 'create-datastore'
The missing override caused 'create-datastore' tasks to not be
pretty-printed/localized in any task list in the UI.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250604124815.180174-1-l.wagner@proxmox.com
 [TL: fleece in code reformatting changes from adaption of biome]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-10 11:35:28 +02:00
Thomas Lamprecht
c6c58a0fc9 bump version to 4.0.1-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-08 20:03:00 +02:00
Thomas Lamprecht
16a10e64dc d/control: update SCSI library to libsgutils2-1.48 from Debian Trixie
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-08 20:02:19 +02:00
Thomas Lamprecht
43143681a1 bump version to 4.0.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-08 19:28:32 +02:00
Christian Ebner
caa1f134f1 verify: refactor verify related functions to be methods of worker
Instead of passing the VerifyWorker state as reference to the various
verification related functions, implement them as methods or
associated functions of the VerifyWorker. This does not only make
their correlation more clear, but it also reduces the number of
function call parameters and improves readability.

No functional changes intended.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250703131837.786811-8-c.ebner@proxmox.com
2025-07-04 13:01:58 +02:00
Christian Ebner
433fc1b73b datastore: ignore missing owner file when removing group directory
Since commit 23be00a4 ("fix #3336: datastore: remove group if the
last snapshot is removed"), a backup group directory is cleaned up
when the new locking mechanism is in use once:
- the group is requested to be destroyed and all the snapshots have
  been deleted
- the last snapshot of a group has been destroyed
Since then, the owner file is also cleaned up separately.

However, the owner file might be already missing due to removal of
the group directory executed when removing the last backup snapshot
of the group, making the subsequent call in the backup group destroy
method fail.

Fix this by ignoring a missing owner file and continue with trying to
emove the group directory itself.

Fixes: 23be00a4 ("fix #3336: datastore: remove group if the last snapshot is removed")
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250703131837.786811-7-c.ebner@proxmox.com
2025-07-04 13:01:52 +02:00
Christian Ebner
039808bd3d bin: sort submodules alphabetically
Makes it easier to find existing entries or insert new modules.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250703131837.786811-6-c.ebner@proxmox.com
2025-07-04 13:01:49 +02:00
Christian Ebner
609d0bf289 api: fix minor formatting issues
These are currently not shown by a `cargo fmt --check`.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250703131837.786811-5-c.ebner@proxmox.com
2025-07-04 13:01:31 +02:00
Fabian Grünbichler
4db56a0478 fix static build
`cargo rustc` only passes the flags (like `target-feature` in this case) for
the final invocation, not for any dependency compilation.

unfortunately, switching to `cargo build` is not straight-forward:
- during a package build, $CARGO is the cargo wrapper which only honors
  RUSTFLAGS in its `prepare-debian` invocation
- rustflags in cargo's config.toml are global/per target
- the unstable override that would allow setting them per profile is broken
- and it would only work for the final invocation anyway, just like `cargo rustc`

as a stop-gap measure, let's duplicate and adapt the generated config.toml, and
select it explicitly when doing the static compilation as part of the package
build. manual `make proxmox-backup-client-static` can still just pass RUSTFLAGS
via the environment..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
[WB: separate -i and -e in sed invocation, add -r, drop backslashes]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-06-30 15:01:38 +02:00
Thomas Lamprecht
d5e4a2bb71 bump version to 4.0.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 14:53:46 +02:00
Thomas Lamprecht
d9df824402 d/lintian: update override for unusual target to moved systemd unit path
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 14:53:23 +02:00
Thomas Lamprecht
02a204cab8 d/lintian: fix overrides for static package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 14:41:23 +02:00
Thomas Lamprecht
3117a8e790 d/lintian-overrides: allow embedded library in static package build
We want the library to be embedded in the static build after all.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 14:29:28 +02:00
Thomas Lamprecht
e245786bfb udev rules: update comment and add file endings
no semantic change intended.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 14:29:28 +02:00
Thomas Lamprecht
c2173520d2 install systemd services in /usr to avoid aliased-location
For better compat with the usrmerge/hermetic-/usr philosophies, and,
well, lintian complaining about this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 14:29:28 +02:00
Thomas Lamprecht
f4b78e35d9 workspace: require proxmox-router >= 3.2.2
To ensure the ReST synopsis documentation output is compatible with
the Sphinx version from Trixie.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 14:08:53 +02:00
Thomas Lamprecht
bfa0893b34 docs: scan refs: cast _StrPath type explicitly to str
To fix the following exception one gets with the Sphinx and Python
versions from Trixie:

  File "/home/tom/sources/others/pbs/proxmox-backup/build/docs/_ext/proxmox-scanrefs.py", line 92, in write_doc
    filename_html = re.sub('.rst', '.html', filename)
  File "/usr/lib/python3.13/re/__init__.py", line 208, in sub
    return _compile(pattern, flags).sub(repl, string, count)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  TypeError: expected string or bytes-like object, got '_StrPath'

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 13:59:37 +02:00
Wolfgang Bumiller
c48b8a6c8f examples: update completion code to rustyline 0.14
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 13:59:37 +02:00
Thomas Lamprecht
ceb6690cdd examples: drop hyper server/client examples
Those are left over from early development experimenting but as they
have nothing to do with PBS itself this is definitively the wrong
place. As they are preserved in the git history forever anyway, just
delete them here completely.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 13:59:37 +02:00
Wolfgang Bumiller
63ece39a17 build: set OPENSSL_STATIC=1 when building static binaries
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 13:59:37 +02:00
Wolfgang Bumiller
d1e9fe0772 pbs-client: update crt-static code to hyper 1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 13:59:37 +02:00
Wolfgang Bumiller
f2a4b46379 build: replace .do-* helpers with grouped targets
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 13:59:37 +02:00
Wolfgang Bumiller
2f30b8404a d/control: update to trixie crate versions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-16 13:59:37 +02:00