]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
14 months agobump version to 3.0.1-1 v3.0.1
Thomas Lamprecht [Tue, 27 Jun 2023 14:04:33 +0000 (16:04 +0200)]
bump version to 3.0.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agofix spelling of command line/command-line
Noel Ullreich [Tue, 27 Jun 2023 12:40:08 +0000 (14:40 +0200)]
fix spelling of command line/command-line

"Commandline", "command line" & "command-line" were being used
interchangeably, which is not correct use command-line when it is an
adjective (e.g. "command-line interface") and use command line when
it is a noun (e.g. "change the setting from the command line")

Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
 [T: fix typos in commit message and reflow ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoconsistenct of USB flash drive spelling
Noel Ullreich [Tue, 27 Jun 2023 12:40:07 +0000 (14:40 +0200)]
consistenct of USB flash drive spelling

To be consistent, replaced all synonyms of USB flash drive (e.g. thumb
drive, drive, stick)

Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
14 months agodocs: user management: use pbs realm instead of pve realm in example
Fiona Ebner [Tue, 27 Jun 2023 12:14:27 +0000 (14:14 +0200)]
docs: user management: use pbs realm instead of pve realm in example

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
14 months agoapi: node services: switch to journald and chrony instead of syslog and timesyncd
Thomas Lamprecht [Tue, 27 Jun 2023 11:34:53 +0000 (13:34 +0200)]
api: node services: switch to journald and chrony instead of syslog and timesyncd

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoui: user view: fix refresh for totp locked column
Dominik Csapak [Tue, 27 Jun 2023 11:27:07 +0000 (13:27 +0200)]
ui: user view: fix refresh for totp locked column

by adding the 'totp-locked' column to the model

a diff store can only know if a column has changed if the column is
defined in the model, otherwise it'll only load it the first time
(when the 'load' called on the diff store)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
14 months agoui: add missing unlockTfa handler
Wolfgang Bumiller [Tue, 27 Jun 2023 10:04:51 +0000 (12:04 +0200)]
ui: add missing unlockTfa handler

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
14 months agocargo: bump dependency for proxmox-rest-server and proxmox-apt
Thomas Lamprecht [Tue, 27 Jun 2023 10:47:53 +0000 (12:47 +0200)]
cargo: bump dependency for proxmox-rest-server and proxmox-apt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agobump version to 3.0.0-2
Thomas Lamprecht [Mon, 26 Jun 2023 20:13:50 +0000 (22:13 +0200)]
bump version to 3.0.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoetc/pbs-enterprise.list: change to bookworm
Thomas Lamprecht [Mon, 26 Jun 2023 20:12:53 +0000 (22:12 +0200)]
etc/pbs-enterprise.list: change to bookworm

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoreadme: update package repos for bookworm
Thomas Lamprecht [Mon, 26 Jun 2023 20:12:26 +0000 (22:12 +0200)]
readme: update package repos for bookworm

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agobump version to 3.0.0-1
Thomas Lamprecht [Mon, 26 Jun 2023 18:00:00 +0000 (20:00 +0200)]
bump version to 3.0.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agodocs: update package repos and APT release key for Bookworm
Thomas Lamprecht [Mon, 26 Jun 2023 18:18:44 +0000 (20:18 +0200)]
docs: update package repos and APT release key for Bookworm

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoui: user view: fix eslint error
Thomas Lamprecht [Mon, 26 Jun 2023 17:55:52 +0000 (19:55 +0200)]
ui: user view: fix eslint error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agodocs: user-management: add section for TFA lockouts
Thomas Lamprecht [Mon, 26 Jun 2023 18:07:39 +0000 (20:07 +0200)]
docs: user-management: add section for TFA lockouts

adapted from pve-docs' commit 96a0d13 ("user management: document TFA
lockout")

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoui: add TFA lock status and unlock button
Wolfgang Bumiller [Fri, 23 Jun 2023 12:44:04 +0000 (14:44 +0200)]
ui: add TFA lock status and unlock button

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agoapi: include tfa lock status in user list
Wolfgang Bumiller [Fri, 23 Jun 2023 12:30:36 +0000 (14:30 +0200)]
api: include tfa lock status in user list

Like in PVE.
This means that /access/users is now a 'protected' call to
get access to 'tfa.cfg'.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agoenable tfa lockout
Wolfgang Bumiller [Fri, 23 Jun 2023 11:43:41 +0000 (13:43 +0200)]
enable tfa lockout

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agomanager: add 'user tfa unlock' command
Wolfgang Bumiller [Fri, 23 Jun 2023 11:56:50 +0000 (13:56 +0200)]
manager: add 'user tfa unlock' command

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agoapi: add /access/users/<userid>/unlock-tfa api call
Wolfgang Bumiller [Fri, 23 Jun 2023 11:53:50 +0000 (13:53 +0200)]
api: add /access/users/<userid>/unlock-tfa api call

Same as in PVE: unlocks a user's 2nd factors.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agoaccess: ldap check connection on creation and change
Stefan Sterz [Mon, 26 Jun 2023 13:17:46 +0000 (15:17 +0200)]
access: ldap check connection on creation and change

this commit makes the ldap realm endpoints check whether a new or
updated configuration works correctly. it uses the new
`check_connection` function to make sure that a configuration can be
successfully used to connect to and query an ldap directory.

doing so allows us to remove the ldap domain regex. instead of relying
on a regex to make sure that a given distinguished name (dn) could be
correct, we simply let the ldap directory tell us whether it accepts
it. this should also aid with usability as a dn that looks correct
could still be invalid.

this also implicitly removes unauthenticated binds, since the new
`check_connection` function does not support those. it will simply
bail out of the check if a `bind_dn` but no password is configured.
therefore, this is a breaking change.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
14 months agobump d/control
Wolfgang Bumiller [Mon, 26 Jun 2023 13:03:41 +0000 (15:03 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agobump proxmox-ldap to 0.2
Wolfgang Bumiller [Mon, 26 Jun 2023 12:52:28 +0000 (14:52 +0200)]
bump proxmox-ldap to 0.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 months agoapi-types: client: datastore: tools: use proxmox-human-bytes crate
Lukas Wagner [Mon, 8 May 2023 10:01:37 +0000 (12:01 +0200)]
api-types: client: datastore: tools: use proxmox-human-bytes crate

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
14 months agotry using 'pve-eslint' if it exists
Dominik Csapak [Fri, 23 Jun 2023 07:08:47 +0000 (09:08 +0200)]
try using 'pve-eslint' if it exists

but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: move into www/manager Makefile directly]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoclippy fixes: deref which would be done by auto-deref
Maximiliano Sandoval [Fri, 16 Jun 2023 08:27:31 +0000 (10:27 +0200)]
clippy fixes: deref which would be done by auto-deref

This unnecessarily complicates the code.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
14 months agoclippy fixes: Box::new(_) of default value
Maximiliano Sandoval [Fri, 16 Jun 2023 08:27:30 +0000 (10:27 +0200)]
clippy fixes: Box::new(_) of default value

From rust-lang:

> Why is this bad?
>
> First, it’s more complex, involving two calls instead of one. Second,
> Box::default() can be faster in certain cases.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
14 months agoclippy fixes: casting to the same type is unnecessary
Maximiliano Sandoval [Fri, 16 Jun 2023 08:27:29 +0000 (10:27 +0200)]
clippy fixes: casting to the same type is unnecessary

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
14 months agoclippy fixes: use of ok_or followed by a function call
Maximiliano Sandoval [Fri, 16 Jun 2023 08:27:28 +0000 (10:27 +0200)]
clippy fixes: use of ok_or followed by a function call

The function will always be called. This is only bad if it allocates or does some non-trivial amount of work.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
14 months agoclippy fixes: the borrowed expression implements the required traits
Maximiliano Sandoval [Fri, 16 Jun 2023 08:27:27 +0000 (10:27 +0200)]
clippy fixes: the borrowed expression implements the required traits

Suggests that the receiver of the expression borrows the expression.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
14 months agod/rules: fix dh_installsystemd invocation
Fabian Grünbichler [Tue, 20 Jun 2023 10:32:59 +0000 (12:32 +0200)]
d/rules: fix dh_installsystemd invocation

the services should definitely not be stopped in preinst!

relevant debdiff with this change:

 Preinst files: lines which differ (wdiff format)
 ------------------------------------------------
 [-# Automatically added by dh_installsystemd/13.11.4-]
 [-if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then-]
 [-      deb-systemd-invoke stop 'proxmox-backup-banner.service' 'proxmox-backup-daily-update.service' 'proxmox-backup-daily-update.timer' 'proxmox-backup-proxy.service' 'proxmox-backup.service' >/dev/null || true-]
 [-fi-]
 [-# End automatically added section-]

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
14 months agofix #4734: manager: add user tfa {list, delete} commands
Maximiliano Sandoval [Fri, 23 Jun 2023 08:28:39 +0000 (10:28 +0200)]
fix #4734: manager: add user tfa {list, delete} commands

Adds the commands

    proxmox-backup-manager user tfa list <userid>
    proxmox-backup-manager user tfa delete <userid> <id>

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
14 months agoapi: Fix schema return annotation of tfa_update_auth
Maximiliano Sandoval [Tue, 20 Jun 2023 13:39:07 +0000 (15:39 +0200)]
api: Fix schema return annotation of tfa_update_auth

In the next commit we expose a command to list the tfa methods of a
user. Without this annotation one would get the following error

    unable to format result: got unexpected data (expected null).

when running the proposed cli command.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
15 months agofile restore: qemu helper: run rustfmt
Maximiliano Sandoval [Fri, 16 Jun 2023 07:35:36 +0000 (09:35 +0200)]
file restore: qemu helper: run rustfmt

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
 [T: fix commit subject ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agofile-restore: factor out detecting debug mode
Thomas Lamprecht [Thu, 15 Jun 2023 16:08:40 +0000 (18:08 +0200)]
file-restore: factor out detecting debug mode

to avoid that the detection logic gets out of sync

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agofile-restore: set loglevel considering PBS_QEMU_DEBUG
Stoiko Ivanov [Thu, 15 Jun 2023 10:42:57 +0000 (12:42 +0200)]
file-restore: set loglevel considering PBS_QEMU_DEBUG

during some tests recently I wondered why a debug log-message was not
printed, despite running with PBS_QEMU_DEBUG.

This patch sets the loglevel for the cli logger to debug if the
variable is present and not-empty (see qemu_helper.rs for the other
usage).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
15 months agofile-restore: set zfs_arc_min to current minimum of 32M
Stoiko Ivanov [Thu, 15 Jun 2023 10:42:56 +0000 (12:42 +0200)]
file-restore: set zfs_arc_min to current minimum of 32M

zfs_arc_min was raised to 32M (for linux) in zfs-commit
121b3cae742a0670d902a51bc61d49dc4a3e4445

while the current logic would still set the min_size to 32M (it's
max(32M, allmem/32), which results to 32M for memory sizes up to
1024M), setting it explicitly to the minimum makes it clear, and will
still be kept should the restore vm have more than 1G of memory at
some point.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
15 months agofile-restore: add zfs. prefix to arc_min/max settings
Stoiko Ivanov [Thu, 15 Jun 2023 10:42:55 +0000 (12:42 +0200)]
file-restore: add zfs. prefix to arc_min/max settings

Currently the values set for zfs_arc_min and zfs_arc_max are ignored
by the kernel:
```
Unknown kernel command line parameters... will be passed to user space
```
module parameters provided on the commandline usually need to be
prefixed with the modulename (e.g. zfs.zfs_arc_min, see [0] for a bit
on related information (the issue itself is not related)).

Paradoxically currently ZFS will print spurious warnings about
settings being ignored when they are actually set - see [1].

Booting the debug image and connecting the shell on the serial console
confirmed that the values did not seem to be set:
`grep '^c_' /proc/spl/kstat/zfs/arcstats` showed half of the memory
for c_max.

[0] https://github.com/openzfs/zfs/issues/698
[1] https://github.com/openzfs/zfs/issues/12504

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
15 months agodrop pam and pam-sys dependencies
Wolfgang Bumiller [Wed, 14 Jun 2023 07:58:56 +0000 (09:58 +0200)]
drop pam and pam-sys dependencies

we don't directly use them anymore

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agobump proxmox-auth-api dep to 0.3
Wolfgang Bumiller [Wed, 14 Jun 2023 07:58:16 +0000 (09:58 +0200)]
bump proxmox-auth-api dep to 0.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agofix #4638: proxmox-backup-client: status: guard against div by zero
Maximiliano Sandoval [Wed, 7 Jun 2023 08:55:13 +0000 (10:55 +0200)]
fix #4638: proxmox-backup-client: status: guard against div by zero

We throw an error if the value for total is zero.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
15 months agoui: tape: fix restore datastore mapping parameter construction
Dominik Csapak [Tue, 6 Jun 2023 09:20:45 +0000 (11:20 +0200)]
ui: tape: fix restore datastore mapping parameter construction

We recently took into account the selected datastore when restoring
from tape, but the snapshot grids value may not only be a single
datastore, it can also be a list of snapshots, datastores or 'all'.

Handle these cases and extract the source datastore correctly.

This fixes tape restoration when not a whole datastore is selected.

Reported in the forum:
https://forum.proxmox.com/threads/restore-from-lto-parameter-verification-errors-store.128445

Fixes: df881ed0 ("ui: tape: fix restoring a single datastore")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agobuildsys: switch from '\s' as a whitespace matcher to `[[:space:]]`
Stefan Sterz [Tue, 6 Jun 2023 07:50:18 +0000 (09:50 +0200)]
buildsys: switch from '\s' as a whitespace matcher to `[[:space:]]`

previously the build process was broken for some versions of `awk`
(most notably `mawk`) as they did not understand the shorthand `\s`
notation for matching a whitspace. use the more universal and more
explicit `[[:space:]]` instead.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
15 months agosort and expand gitignore to cover packaging artefacts
Thomas Lamprecht [Sat, 27 May 2023 15:07:39 +0000 (17:07 +0200)]
sort and expand gitignore to cover packaging artefacts

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobuildsys: improve DSC target & add sbuild convenience target
Thomas Lamprecht [Sat, 27 May 2023 15:03:32 +0000 (17:03 +0200)]
buildsys: improve DSC target & add sbuild convenience target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agoupdate build-dependencies for bookworm mass-bump
Thomas Lamprecht [Sat, 27 May 2023 15:01:34 +0000 (17:01 +0200)]
update build-dependencies for bookworm mass-bump

most had no (significant) change, but where bumped to provide some
version space for future stable-2 updates without clashing with
future master

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agodebian: normalize packaging files with wrap-and-sort -tkn
Thomas Lamprecht [Sat, 27 May 2023 14:33:59 +0000 (16:33 +0200)]
debian: normalize packaging files with wrap-and-sort -tkn

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobump version to 2.99.0-1
Thomas Lamprecht [Sun, 21 May 2023 13:13:33 +0000 (15:13 +0200)]
bump version to 2.99.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agod/control: adapt to libsgutils2 package rename
Thomas Lamprecht [Sun, 21 May 2023 13:31:03 +0000 (15:31 +0200)]
d/control: adapt to libsgutils2 package rename

this feels stupid...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoupdate zstd to 0.12
Fabian Grünbichler [Wed, 4 Jan 2023 14:17:02 +0000 (15:17 +0100)]
update zstd to 0.12

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
16 months agod/control: define compat level via build-depends and raise to 13
Thomas Lamprecht [Sun, 21 May 2023 13:32:32 +0000 (15:32 +0200)]
d/control: define compat level via build-depends and raise to 13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: derive upload dist automatically
Thomas Lamprecht [Sun, 21 May 2023 13:27:55 +0000 (15:27 +0200)]
buildsys: derive upload dist automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agodebian/lintian-overrides: refresh and add some ok-to-ignore ones
Thomas Lamprecht [Sun, 21 May 2023 13:12:58 +0000 (15:12 +0200)]
debian/lintian-overrides: refresh and add some ok-to-ignore ones

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agod/rules: expand make variable directly for version mismatch check
Thomas Lamprecht [Sun, 21 May 2023 12:54:27 +0000 (14:54 +0200)]
d/rules: expand make variable directly for version mismatch check

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agomakefile: convert to use simple parenthesis
Thomas Lamprecht [Sun, 21 May 2023 11:57:47 +0000 (13:57 +0200)]
makefile: convert to use simple parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: cleanup and expand clean target
Thomas Lamprecht [Sun, 21 May 2023 11:56:43 +0000 (13:56 +0200)]
buildsys: cleanup and expand clean target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuild: inject repoid into build environment
Fabian Grünbichler [Wed, 4 Jan 2023 14:13:09 +0000 (15:13 +0100)]
build: inject repoid into build environment

to support building outside of the git tree, e.g. via sbuild.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
16 months agod/source: override some false-positive lintian tags
Thomas Lamprecht [Sun, 21 May 2023 11:50:27 +0000 (13:50 +0200)]
d/source: override some false-positive lintian tags

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agod/file-restore.postinst: add DEBHELPER stanza
Thomas Lamprecht [Sun, 21 May 2023 11:49:59 +0000 (13:49 +0200)]
d/file-restore.postinst: add DEBHELPER stanza

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agod/control: avoid versioned build-dependcies with a -1 revision
Thomas Lamprecht [Sun, 21 May 2023 11:48:57 +0000 (13:48 +0200)]
d/control: avoid versioned build-dependcies with a -1 revision

no use, just makes backporting harder

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: always pre-clean for den and dsc target
Thomas Lamprecht [Sun, 21 May 2023 11:42:19 +0000 (13:42 +0200)]
buildsys: always pre-clean for den and dsc target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: make deb target always build doc package, add deb-nodoc
Thomas Lamprecht [Sun, 21 May 2023 11:35:55 +0000 (13:35 +0200)]
buildsys: make deb target always build doc package, add deb-nodoc

deb should be our common "build all" target, so rather make the
exception a specific target than vice versa.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: simplify getting workspace crate list
Thomas Lamprecht [Sun, 21 May 2023 11:32:43 +0000 (13:32 +0200)]
buildsys: simplify getting workspace crate list

we got awk already in the mix, most of the time one doesn't need
anything else..

Also split over multiple lines for readability

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: get metadata only for workspace when resolving sub crates
Thomas Lamprecht [Sun, 21 May 2023 11:17:50 +0000 (13:17 +0200)]
buildsys: get metadata only for workspace when resolving sub crates

Allows for building a DSC without having the librust-* source code
build-dependencies installed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobump version to 2.4.2-1
Thomas Lamprecht [Wed, 17 May 2023 15:37:38 +0000 (17:37 +0200)]
bump version to 2.4.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobackup-client: clippy fixes
Thomas Lamprecht [Wed, 17 May 2023 15:36:38 +0000 (17:36 +0200)]
backup-client: clippy fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agofile restore: clippy and format argument fixes
Thomas Lamprecht [Wed, 17 May 2023 15:36:20 +0000 (17:36 +0200)]
file restore: clippy and format argument fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agopbs-datastore: clippy fixes
Thomas Lamprecht [Wed, 17 May 2023 15:35:42 +0000 (17:35 +0200)]
pbs-datastore: clippy fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agopbs-client: clippy fixes
Thomas Lamprecht [Wed, 17 May 2023 15:34:52 +0000 (17:34 +0200)]
pbs-client: clippy fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agopbs-tape: clippy and format string fixes
Thomas Lamprecht [Wed, 17 May 2023 14:47:03 +0000 (16:47 +0200)]
pbs-tape: clippy and format string fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agopbs-config: clippy fixes
Thomas Lamprecht [Wed, 17 May 2023 14:40:41 +0000 (16:40 +0200)]
pbs-config: clippy fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoclippy fixes
Thomas Lamprecht [Wed, 17 May 2023 14:10:34 +0000 (16:10 +0200)]
clippy fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agodatastore: return error instead of unreachable
Thomas Lamprecht [Wed, 17 May 2023 14:06:25 +0000 (16:06 +0200)]
datastore: return error instead of unreachable

very unexpected and unreachable is probably fine here, but it's not
really winning us anything, so avoid the panic-potential and just
bail out.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotape: MAM: replace tuple with struct for better readability
Thomas Lamprecht [Wed, 17 May 2023 13:52:24 +0000 (15:52 +0200)]
tape: MAM: replace tuple with struct for better readability

It's needlessly adding mental complexity to always have to translate
usages like info.0 or info.1 in ones head when reading the code.

Transforming this to a struct allows for using descriptive names when
accessing the specific fields and allows for implementing a
constructor per MamFormat, reducing the resulting MAM attribute list
by quite a few lines.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotape: avoid panic potential in MAM attribute decoder
Thomas Lamprecht [Wed, 17 May 2023 12:57:15 +0000 (14:57 +0200)]
tape: avoid panic potential in MAM attribute decoder

We already saw that quite some tape libraries/loaders/... ain't
always _that_ standard conform, and even if it'd be guaranteed, it
just makes no sense to create a potential for panicking the whole
daemon due to some sub-features hiccup, rather go for actual error
handling...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotape: update link to IBM SCSI reference LTO 5 - 9
Thomas Lamprecht [Wed, 17 May 2023 12:52:29 +0000 (14:52 +0200)]
tape: update link to IBM SCSI reference LTO 5 - 9

The linked PDF is also captured and archived here:
https://web.archive.org/web/20230517122521/https://www.ibm.com/support/pages/system/files/inline-files/LTO%20SCSI%20Reference_GA32-0928-05%20%28EXTERNAL%29_0.pdf#

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotape: reduce indentation depth of MAM attribute decoder
Thomas Lamprecht [Wed, 17 May 2023 12:43:01 +0000 (14:43 +0200)]
tape: reduce indentation depth of MAM attribute decoder

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agodatastore: fix compiler warning for unused FromStr import
Thomas Lamprecht [Wed, 17 May 2023 12:33:11 +0000 (14:33 +0200)]
datastore: fix compiler warning for unused FromStr import

Fixes: 161a8864 ("fix #4357: datastore: take into account namespaces ...")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: main view: rename "Theme" selector to "Color Theme"
Stefan Sterz [Fri, 14 Apr 2023 13:28:10 +0000 (15:28 +0200)]
ui: main view: rename "Theme" selector to "Color Theme"

this is already the case in Proxmox VE so just use the same wording
here too to stay consistent

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
16 months agodocs: fix api viewer dark theme path
Stefan Sterz [Fri, 14 Apr 2023 13:28:09 +0000 (15:28 +0200)]
docs: fix api viewer dark theme path

previously the path to the dark theme's css pointed to the wrong file.
it didn't exist, this one should.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
16 months agofix #4357: datastore: take into account namespaces when marking chunks
Stefan Sterz [Thu, 20 Apr 2023 08:08:53 +0000 (10:08 +0200)]
fix #4357: datastore: take into account namespaces when marking chunks

previously when marking used chunks the namespace wasn't taken into
account and valid snapshots were marked as "strange paths". this lead
to a line in the log of a gc job such as this:

found (and marked) 2 index files outside of expected directory scheme

which some users perceived as an error. parse the namespace too and
only mark the path as strange if parsing the namespace and/or backup
dir fails.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
16 months agoui: tape: fix restoring a single datastore
Dominik Csapak [Tue, 25 Apr 2023 13:59:56 +0000 (15:59 +0200)]
ui: tape: fix restoring a single datastore

if the user selected a single datastore to restore from tape on a
media-set that includes more than one, the ui suggests (and is
intended to) that only that datastore will be restored on the selected
target.

The logic to construct the store mapping parameter did not consider that
case, and simply gave the target as default store, which meant all
datastores were restored onto the target.

To fix that, we have to get the source datastore from the field, and
construct the correct parameter ("source=target").

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agoui: tape: fix code style/formatting
Dominik Csapak [Tue, 25 Apr 2023 13:59:55 +0000 (15:59 +0200)]
ui: tape: fix code style/formatting

this is a separate statement, it should be on a separate line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agoui: dashboard: show tape backups/restores on task summary
Dominik Csapak [Wed, 3 May 2023 12:25:18 +0000 (14:25 +0200)]
ui: dashboard: show tape backups/restores on task summary

for that we have to increase the panel height a bit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agoui: dashboard: fix missing prune jobs on task summary
Dominik Csapak [Wed, 3 May 2023 12:25:17 +0000 (14:25 +0200)]
ui: dashboard: fix missing prune jobs on task summary

we want to count types 'prune' and 'prunejobs' for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agofix #4722: allow all netmask values for reverse lookup
Fabian Grünbichler [Tue, 9 May 2023 09:15:13 +0000 (11:15 +0200)]
fix #4722: allow all netmask values for reverse lookup

the only place this is used (parsing a 'netmask XXX' directive in an interfaces
file) allows any integer as value both when parsing and when validating, so
there is no reason to restrict this to only allow string netmasks >=
8/255.0.0.0 as far as I can tell..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
16 months agoui: fix reloading subscription info after key upload
Thomas Lamprecht [Wed, 17 May 2023 06:17:37 +0000 (08:17 +0200)]
ui: fix reloading subscription info after key upload

ExtJS has a `listeners` but no `listener` config, so add the missing
`s` to ensure the upload window destroy event callback is triggered.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agodisable tfa lockout for now
Wolfgang Bumiller [Wed, 10 May 2023 09:47:19 +0000 (11:47 +0200)]
disable tfa lockout for now

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agobump proxmox-tfa dep to 4
Wolfgang Bumiller [Wed, 10 May 2023 09:43:27 +0000 (11:43 +0200)]
bump proxmox-tfa dep to 4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agofix #4719: wait for tape to be available in changer
Dominik Csapak [Mon, 8 May 2023 11:03:41 +0000 (13:03 +0200)]
fix #4719: wait for tape to be available in changer

instead of aborting. If the tape is currently e.g. offline, in an
import/export slot or in the wrong drive, this gives the user the chance to
manually move it/insert it, so that the backup job can continue.

Send an e-mail like we do on a standalone drive, but adapt the messages
to contain the changer instead of the drive.

This can help when not all tapes are currently available in the changer.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agotape restore: show required tape list on single snapshot restore
Dominik Csapak [Fri, 5 May 2023 14:38:42 +0000 (16:38 +0200)]
tape restore: show required tape list on single snapshot restore

like we do on a full restore, for that refactor the functionality into
'log_required_tapes' to be reused across the workers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agodocs: fix location of webauthn configuration
Thomas Lamprecht [Mon, 8 May 2023 11:16:05 +0000 (13:16 +0200)]
docs: fix location of webauthn configuration

This was it's own panel for some time but moved into a more general
"Other" panel together with some other settings that are normally
only changed once, on initial setup (better names welcome...).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agopull: impl Display for SkipReason
Fabian Grünbichler [Mon, 24 Apr 2023 13:56:26 +0000 (15:56 +0200)]
pull: impl Display for SkipReason

instead of manually doing it in SkipInfo's Display implementation.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
16 months agoui: sync job: add transfer-last parameter
Stefan Hanreich [Tue, 18 Apr 2023 14:59:47 +0000 (16:59 +0200)]
ui: sync job: add transfer-last parameter

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
16 months agosync job: pull: improve log output
Stefan Hanreich [Tue, 18 Apr 2023 14:59:46 +0000 (16:59 +0200)]
sync job: pull: improve log output

Adding an opening line for every group makes parsing the log easier.

We can also remove the 're-sync [...] done' line, because the next
line should be a progress line anyway.

The new output for the sync job/pull logs looks as follows:

- skipped already synced (happens in most jobs, except for first run)
- re-sync of last synced snapshot (if it still exists on source)
- skipped because of transfer-last (if set and skips something)
- sync of new snapshots (if they exist)

Suggested-By: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
16 months agopartial fix #3701: sync job: pull: add transfer-last parameter
Stefan Hanreich [Tue, 18 Apr 2023 14:59:45 +0000 (16:59 +0200)]
partial fix #3701: sync job: pull: add transfer-last parameter

Specifying the transfer-last parameter limits the amount of backups
that get synced via the pull command/sync job. The parameter specifies
how many of the N latest backups should get pulled/synced. All other
backups will get skipped.

This is particularly useful in situations where the sync target has
less disk space than the source. Syncing all backups from the source
is not possible if there is not enough disk space on the target.
Additionally this can be used for limiting the amount of data
transferred, reducing load on the network.

The newest backup will always get re-synced, regardless of the setting
of the transfer-last parameter.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
16 months agoui: tape: prevent mislabeling tapes in changers
Dominik Csapak [Mon, 17 Apr 2023 11:59:05 +0000 (13:59 +0200)]
ui: tape: prevent mislabeling tapes in changers

when labeling a tape in a changer, we pre-fill the label field with
the one from the barcode (if it exists). Letting the user change
the label here does not make much sense, since we assume that they are
the same (e.g. for move operations etc.)

So instead simply display the label to protect users from accidentally
changing it. If a user really needs to have a different label than the
suggested one, it's still possible on the cli.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agotape: typo fixes
Dominik Csapak [Mon, 24 Apr 2023 07:51:04 +0000 (09:51 +0200)]
tape: typo fixes

replacable to replaceable
 the field 'field_replacable_unit_code' is not currently used anywhere
descriptior to descriptor
Resuqest to Request
and flags2 to flags3 (the number indicates the numbering of the field
 and it's the third field, not the second)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agotape: implement 6 byte fallback for MODE SENSE/SELECT
Dietmar Maurer [Fri, 21 Apr 2023 11:01:44 +0000 (13:01 +0200)]
tape: implement 6 byte fallback for MODE SENSE/SELECT

there are tape drives (esp. virtual ones) that don't implement the
10-byte variants of MODE SENSE/SELECT. Since the pages we set/request
are never bigger than 255 bytes anyway, we can implement a fallback
with the 6 byte variant here.

Implementing this as a fallback to make sure that existing working
drives keep the existing implementation.

Tested with Starwind VTL.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
17 months agoupdate to syslog 6
Fabian Grünbichler [Thu, 20 Apr 2023 12:25:13 +0000 (14:25 +0200)]
update to syslog 6

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>