]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
22 months agoapi: serde-rename deleteable properties to kebab-case
Lukas Wagner [Thu, 19 Jan 2023 15:52:32 +0000 (16:52 +0100)]
api: serde-rename deleteable properties to kebab-case

In former commit, the enum members were renamed to be CamelCase, in
accordance with the usual Rust style guide. However, this broke the
GUI in some places due to failing JSON property deserialization.
To fix this, some serde(rename = "kebab-case") directives were added.

Some properties were also serde-renamed to snake_case, otherwise
it would have been necessary to also modify proxmox-widget-toolkit
as well as PVE source code. This can follow in a later commit if so
desired.

Fixes: a2055c38 fix non-camel-case enums
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
22 months agoapi: node tasks: small cleanups
Thomas Lamprecht [Thu, 19 Jan 2023 10:26:46 +0000 (11:26 +0100)]
api: node tasks: small cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agodatastore: rustfmt
Thomas Lamprecht [Thu, 19 Jan 2023 10:25:48 +0000 (11:25 +0100)]
datastore: rustfmt

Fixes: d2aff935 ("update to nix 0.26")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoclient: task log: use fstrings for shorter code
Thomas Lamprecht [Thu, 19 Jan 2023 10:37:07 +0000 (11:37 +0100)]
client: task log: use fstrings for shorter code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoclient: task log: only encode upid once
Thomas Lamprecht [Thu, 19 Jan 2023 09:38:15 +0000 (10:38 +0100)]
client: task log: only encode upid once

Instead of percent-encoding the UPID on every loop iteration plus on
abort, just encode it once before entering the loop.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agofix #4483: fix `task log` command interrupt handling
Fabian Grünbichler [Wed, 18 Jan 2023 13:53:42 +0000 (14:53 +0100)]
fix #4483: fix `task log` command interrupt handling

`proxmox-backup-client task log ..` and `proxmox-backup-manager task log ..`
are used to view the logs of tasks that have been started by another client, so
interrupting the task progress view should not forward the interrupt to the
running task. other call sites of the same helper(s) that spawn a task and then
print its progress should keep the old behaviour of interrupting the spawned
task on C^c.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agoapi: apt: versions: add proxmox-mail-forward to package list
Fiona Ebner [Fri, 2 Dec 2022 14:26:25 +0000 (15:26 +0100)]
api: apt: versions: add proxmox-mail-forward to package list

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
22 months agodocs: fix typo in garbage collection section
Stefan Hanreich [Tue, 17 Jan 2023 13:06:53 +0000 (14:06 +0100)]
docs: fix typo in garbage collection section

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
22 months agotape inventory: code cleanup listing media assigned to a pool
Thomas Lamprecht [Mon, 16 Jan 2023 10:05:25 +0000 (11:05 +0100)]
tape inventory: code cleanup listing media assigned to a pool

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agotape inventory: code cleanup media pool look-up
Thomas Lamprecht [Mon, 16 Jan 2023 10:04:07 +0000 (11:04 +0100)]
tape inventory: code cleanup media pool look-up

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agotape inventory: make both media list methods use same appraoch
Thomas Lamprecht [Mon, 16 Jan 2023 10:00:57 +0000 (11:00 +0100)]
tape inventory: make both media list methods use same appraoch

Was a bit odd that the very similar (same return type) methods used
a for+if/else+push and a iter+filter+collect approach.

Switch both to the latter and use a match instead of if/else for
shorter code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agofix #4466: show snapshots in media content again
Dominik Csapak [Mon, 16 Jan 2023 08:21:44 +0000 (09:21 +0100)]
fix #4466: show snapshots in media content again

while refactoring the the empty media set checks, we accidentally
reversed one check from !is_empty to unassigned, which now never
included the right media sets.

reversing the condition fixes that.

fixes
52517f7b: ("tape: hide internal use of all zero uuid for unassigned tapes")

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
22 months agocargo: update proxmox-openid to 0.9.9
Thomas Lamprecht [Wed, 11 Jan 2023 17:45:25 +0000 (18:45 +0100)]
cargo: update proxmox-openid to 0.9.9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoupdate to nix 0.26
Fabian Grünbichler [Wed, 4 Jan 2023 13:54:50 +0000 (14:54 +0100)]
update to nix 0.26

and corresponding proxmox-* dependencies to their versions depending on nix
0.26.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agohttp client: suppress "storing login ticket"-error when not using a TTY
Fiona Ebner [Thu, 5 Jan 2023 10:19:32 +0000 (11:19 +0100)]
http client: suppress "storing login ticket"-error when not using a TTY

as a stop-gap measure. Otherwise, task logs for PVE backups started
via non-CLI will have the message
> storing login ticket failed: $XDG_RUNTIME_DIR must be set
show up when running a proxmox-backup-client command (e.g. setting
notes and when uploading the log). This is confusing to users[0].

[0]: https://forum.proxmox.com/threads/120492/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
22 months agofix non-camel-case enums
Wolfgang Bumiller [Thu, 5 Jan 2023 09:57:11 +0000 (10:57 +0100)]
fix non-camel-case enums

This should have never been started to begin with...

22 months agodisk: zfs: improve error logging for zfs commands
Dominik Csapak [Tue, 29 Nov 2022 08:16:11 +0000 (09:16 +0100)]
disk: zfs: improve error logging for zfs commands

zfs errors might include a newline in the output (e.g. when trying to
create a mirror on two differently sized disks), which trips up our
task log status parser since that expectes a 'TASK {status}' on the
beginning of the first line.

print the error from zfs into the log and bail out with a short notice
to check the task log

this fixes the 'unknown error' issue in the ui when an error happnes
during the zfs commands

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
22 months agoapi2/node/services: Handle optional services and expose unit-state
Christoph Heiss [Thu, 22 Dec 2022 12:05:49 +0000 (13:05 +0100)]
api2/node/services: Handle optional services and expose unit-state

.. in the same way the PVE api does, esp. regarding the logic to handle
oneshot and missing services.

This then allows re-using the GUI parts from there as well, so that the
services page in PVE and PBS looks the same.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
22 months agofix typo
Fabian Grünbichler [Wed, 4 Jan 2023 11:05:58 +0000 (12:05 +0100)]
fix typo

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agoui: verify jobs: set/improve min-width for datastore and namespace columns
Thomas Lamprecht [Wed, 4 Jan 2023 10:19:29 +0000 (11:19 +0100)]
ui: verify jobs: set/improve min-width for datastore and namespace columns

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agofix #4448: ui: verify jobs: add namespace and max-depth columns
Thomas Lamprecht [Wed, 4 Jan 2023 10:14:06 +0000 (11:14 +0100)]
fix #4448: ui: verify jobs: add namespace and max-depth columns

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agofix #4448: ui: prune jobs: rename Store to Datastore for consitency
Thomas Lamprecht [Wed, 4 Jan 2023 10:03:40 +0000 (11:03 +0100)]
fix #4448: ui: prune jobs: rename Store to Datastore for consitency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agobump version to 2.3.2-1
Fabian Grünbichler [Thu, 22 Dec 2022 10:35:51 +0000 (11:35 +0100)]
bump version to 2.3.2-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agofixup doc string formatting and line-wrap comments
Wolfgang Bumiller [Tue, 20 Dec 2022 09:33:50 +0000 (10:33 +0100)]
fixup doc string formatting and line-wrap comments

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agofix #4256: api2: remove datastore ACL-node on removal of datastore
Hannes Laimer [Mon, 19 Dec 2022 14:13:25 +0000 (15:13 +0100)]
fix #4256: api2: remove datastore ACL-node on removal of datastore

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
23 months agopbs-config: add delete_node for ACL-tree
Hannes Laimer [Mon, 19 Dec 2022 14:13:24 +0000 (15:13 +0100)]
pbs-config: add delete_node for ACL-tree

... needed for the deletion of datastore ACL-nodes when the datastore
is removed.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
23 months agofix #4256: api2: remove prune jobs on datastore delete
Hannes Laimer [Mon, 19 Dec 2022 14:13:23 +0000 (15:13 +0100)]
fix #4256: api2: remove prune jobs on datastore delete

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
23 months agofix #4387: pbs-client: print task-logs to stdout
Hannes Laimer [Mon, 19 Dec 2022 11:20:24 +0000 (12:20 +0100)]
fix #4387: pbs-client: print task-logs to stdout

... since those logs are the result of the command.

23 months agoderive Clone and PartialEq for some API types
Dietmar Maurer [Thu, 15 Dec 2022 16:34:13 +0000 (17:34 +0100)]
derive Clone and PartialEq for some API types

This is useful for react-lik GUI toolkits which need to do VDOM diffs.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
23 months agod/postinst: check if datastore lockfile actually exists
Fiona Ebner [Thu, 15 Dec 2022 08:13:25 +0000 (09:13 +0100)]
d/postinst: check if datastore lockfile actually exists

On an installation that never had any datastores, dkpg would fail to
configure the package.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
23 months agod/control: add jq as a build dependency
Fiona Ebner [Thu, 15 Dec 2022 08:13:24 +0000 (09:13 +0100)]
d/control: add jq as a build dependency

It's used in the Makefile and building will fail without it.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
23 months agofix #4346: pbs-client: don't fail silently when storing ticket
Christoph Heiss [Mon, 12 Dec 2022 14:10:56 +0000 (15:10 +0100)]
fix #4346: pbs-client: don't fail silently when storing ticket

Instead, report an error if storing the ticket info failed, so that the
user is informed that something went wrong and follow-up commands might
require authentication again.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
23 months agomove pbs_tools::ticket to pbs_ticket
Wolfgang Bumiller [Tue, 13 Dec 2022 12:55:16 +0000 (13:55 +0100)]
move pbs_tools::ticket to pbs_ticket

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobuild: drop pbs-buildcfg version hack
Fabian Grünbichler [Tue, 13 Dec 2022 08:44:44 +0000 (09:44 +0100)]
build: drop pbs-buildcfg version hack

no longer needed, it inherits the workspace/proxmox-backup version now, there
is no risk of forgetting to update its version anymore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agobuild: use workspace member list for SUBCRATES
Fabian Grünbichler [Tue, 13 Dec 2022 08:44:11 +0000 (09:44 +0100)]
build: use workspace member list for SUBCRATES

similar to what's done in the proxmox repo/workspace, to avoid them getting out
of sync. before this change, the recently introduced pbs-key-config was
missing.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agomove pbs_config::tape_encryption_keys to pbs crate lib
Wolfgang Bumiller [Mon, 12 Dec 2022 13:26:02 +0000 (14:26 +0100)]
move pbs_config::tape_encryption_keys to pbs crate lib

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agomove pbs_config::key_config to pbs-key-config
Wolfgang Bumiller [Mon, 12 Dec 2022 13:19:52 +0000 (14:19 +0100)]
move pbs_config::key_config to pbs-key-config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoupdate for new proxmox-api-macro
Wolfgang Bumiller [Mon, 12 Dec 2022 10:40:12 +0000 (11:40 +0100)]
update for new proxmox-api-macro

A #[default] attribute now conflicts with an explicitly
defined #[api(default: ...)] value for obvious reasons.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosort dependencies
Fabian Grünbichler [Fri, 9 Dec 2022 12:58:19 +0000 (13:58 +0100)]
sort dependencies

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoswitch remaining member dependencies to workspace
Fabian Grünbichler [Fri, 9 Dec 2022 12:52:03 +0000 (13:52 +0100)]
switch remaining member dependencies to workspace

these are only used by a single member at the moment, but we can move them to
the workspace to have a single location for version + base feature set
specification.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agomake main crate dependencies workspace dependencies
Fabian Grünbichler [Fri, 9 Dec 2022 12:47:38 +0000 (13:47 +0100)]
make main crate dependencies workspace dependencies

these 10 crates are only used by the main crate itself, make them workspace
dependencies to reduce churn if they are every used by a member as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoupdate d/control
Fabian Grünbichler [Fri, 9 Dec 2022 12:37:54 +0000 (13:37 +0100)]
update d/control

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoswitch regular dependencies to workspace ones
Fabian Grünbichler [Fri, 9 Dec 2022 12:22:58 +0000 (13:22 +0100)]
switch regular dependencies to workspace ones

where applicable.

notable changes:
- serde now uses 'derive' feature across the board
- serde removed from pbs-tools (not used)
- openssl bumped to 0.40 (and patched comment removed)
- removed invalid zstd comment

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoupdate d/control
Fabian Grünbichler [Fri, 9 Dec 2022 10:50:55 +0000 (11:50 +0100)]
update d/control

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoswitch proxmox dependencies to workspace
Fabian Grünbichler [Fri, 9 Dec 2022 10:37:02 +0000 (11:37 +0100)]
switch proxmox dependencies to workspace

besides harmonizing versions, the only global change is that the tokio-io
feature of pxar is now implied since its default anyway, instead of being
spelled out.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoadd pbs-api-types to Cargo.toml
Fabian Grünbichler [Fri, 9 Dec 2022 10:49:59 +0000 (11:49 +0100)]
add pbs-api-types to Cargo.toml

else the next commit would drop its dependencies for d/control generation.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agorestore-daemon: add missing tokio feature
Fabian Grünbichler [Wed, 7 Dec 2022 11:06:43 +0000 (12:06 +0100)]
restore-daemon: add missing tokio feature

hidden by the top-level crate enabling it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoworkspace: inherit metadata
Fabian Grünbichler [Wed, 7 Dec 2022 10:33:47 +0000 (11:33 +0100)]
workspace: inherit metadata

pbs-buildcfg is the only one that needs to inherit the version as well, since
it stores it in the compiled crate.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agomanager: remove accidentally committed ldap.rs
Lukas Wagner [Fri, 9 Dec 2022 13:13:49 +0000 (14:13 +0100)]
manager: remove accidentally committed ldap.rs

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
23 months agobump d/control
Wolfgang Bumiller [Fri, 9 Dec 2022 13:39:48 +0000 (14:39 +0100)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agodebug cli: move parameters into the function signature
Lukas Wagner [Fri, 9 Dec 2022 11:14:26 +0000 (12:14 +0100)]
debug cli: move parameters into the function signature

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
23 months agodebug cli: add colored output for `diff archive`
Lukas Wagner [Fri, 9 Dec 2022 11:14:25 +0000 (12:14 +0100)]
debug cli: add colored output for `diff archive`

This commit adds the `--color` flag to the `diff archive` tool.
Valid values are `always`, `auto` and `never`. `always` and
`never` should be self-explanatory, whereas `auto` will enable
colors unless one of the following is true:
  - STDOUT is not a tty
  - TERM=dumb is set
  - NO_COLOR is set

The tool will highlight changed file attributes in yellow.
Furthermore, (A)dded files are highlighted in green,
(M)odified in yellow and (D)eleted in red.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
23 months agodebug cli: add 'compare-content' flag to `diff archive` command
Lukas Wagner [Fri, 9 Dec 2022 11:14:24 +0000 (12:14 +0100)]
debug cli: add 'compare-content' flag to `diff archive` command

When --compare-content is set, the command will compare the
file content instead on relying on mtime to detect modified files.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
23 months agodebug cli: show more file attributes for `diff archive` command
Lukas Wagner [Fri, 9 Dec 2022 11:14:23 +0000 (12:14 +0100)]
debug cli: show more file attributes for `diff archive` command

This commit enriches the output of the `diff archive` command,
showing pxar entry type, mode, uid, gid, size, mtime and filename.
Attributes that changed between both snapshots are prefixed
with a "*".

For instance:

$ proxmox-backup-debug diff archive ...
A  f   644  10045  10000    0 B  2022-11-28 13:44:51  add.txt
M  f   644  10045  10000    6 B *2022-11-28 13:45:05  content.txt
D  f   644  10045  10000    0 B  2022-11-28 13:17:09  deleted.txt
M  f   644  10045    *29    0 B  2022-11-28 13:16:20  gid.txt
M  f  *777  10045  10000    0 B  2022-11-28 13:42:47  mode.txt
M  f   644  10045  10000    0 B *2022-11-28 13:44:33  mtime.txt
M  f   644  10045  10000   *7 B *2022-11-28 13:44:59 *size.txt
M  f   644 *64045  10000    0 B  2022-11-28 13:16:18  uid.txt
M *f   644  10045  10000   10 B  2022-11-28 13:44:59  type_changed.txt

Also, this commit ensures that we always show the *new* type.
Previously, the command showed the old type if it was changed.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
23 months agotree-wide: bump edition to 2021
Wolfgang Bumiller [Tue, 6 Dec 2022 10:19:41 +0000 (11:19 +0100)]
tree-wide: bump edition to 2021

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agomove fuse code from pbs-client to pbs-pxar-fuse
Wolfgang Bumiller [Tue, 6 Dec 2022 08:17:03 +0000 (09:17 +0100)]
move fuse code from pbs-client to pbs-pxar-fuse

it's used by pxar-bin and proxmox-backup-client for
mounting, but pbs-client is used by more (eg. the
proxmox-backup-qemu library which really doesn't need to
pull in any fuse dependencies)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoclippy 1.65 fixes
Fabian Grünbichler [Mon, 5 Dec 2022 10:27:40 +0000 (11:27 +0100)]
clippy 1.65 fixes

and rustfmt

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoui: metricserver: fix enable column
Dominik Csapak [Tue, 29 Nov 2022 12:01:03 +0000 (13:01 +0100)]
ui: metricserver: fix enable column

we use 'enable' property here with a default of true, so change
the dataIndex and the renderer to reflect that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agotape: inventory: skip unassigned tapes
Dominik Csapak [Tue, 29 Nov 2022 14:17:01 +0000 (15:17 +0100)]
tape: inventory: skip unassigned tapes

tapes that are labeled into a pool but are not in a media-set yet, belong
to the special 'all zero' media-set. these will never have a catalog on them,
so skip them

fixes the issue, that an inventory with 'catalog restore' aborted on
such a tape

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agotape: hide internal use of all zero uuid for unassigned tapes
Dominik Csapak [Tue, 29 Nov 2022 14:17:00 +0000 (15:17 +0100)]
tape: hide internal use of all zero uuid for unassigned tapes

a tape assigned to a pool but no media-set, gets the special 'all zero'
media set in it's MediaSetLabel. Instead of having that constant
scattered all over the code, hide this fact by using wrapper functions
to initialize it that way and to check for it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agoFix formatting in proxmox-backup-manager
Stefan Hanreich [Tue, 29 Nov 2022 15:53:43 +0000 (16:53 +0100)]
Fix formatting in proxmox-backup-manager

Small followup to my previous commit, fixing minor formatting issues.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
23 months agoui: datastore options: fix default for prune notify render
Thomas Lamprecht [Tue, 29 Nov 2022 09:28:10 +0000 (10:28 +0100)]
ui: datastore options: fix default for prune notify render

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agobump version to 2.3.1-1 v2.3.1
Thomas Lamprecht [Mon, 28 Nov 2022 16:18:15 +0000 (17:18 +0100)]
bump version to 2.3.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: link all screenshots to their image file
Thomas Lamprecht [Mon, 28 Nov 2022 16:15:42 +0000 (17:15 +0100)]
docs: link all screenshots to their image file

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agod/postinst: try to fixup installations with wrong .datastore.lck owner
Thomas Lamprecht [Mon, 28 Nov 2022 16:03:39 +0000 (17:03 +0100)]
d/postinst: try to fixup installations with wrong .datastore.lck owner

Must be a rather ancient installation in that case as we create
new lockfiles with backup:backup since a while.

Note that this wasn't all to relevant until recently when we fixed a
TOCTOU for maintenance mode check by locking on datastore create,
which happens in the unpriv. proxy daemon too, e.g., for the
datastore status call.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agobump version to 2.3.0-1
Thomas Lamprecht [Mon, 28 Nov 2022 15:11:09 +0000 (16:11 +0100)]
bump version to 2.3.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: ransomware: drop extra 'd'
Thomas Lamprecht [Mon, 28 Nov 2022 15:02:25 +0000 (16:02 +0100)]
docs: ransomware: drop extra 'd'

Reported-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: add paragraph on verification jobs to ransomware section
Stefan Sterz [Mon, 28 Nov 2022 14:34:01 +0000 (15:34 +0100)]
docs: add paragraph on verification jobs to ransomware section

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
23 months agodocs: minor re-phrasing and spell checking clean up
Stefan Sterz [Mon, 28 Nov 2022 14:34:00 +0000 (15:34 +0100)]
docs: minor re-phrasing and spell checking clean up

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
23 months agodocs: don't mention CLI only anymore for tuning options
Dominik Csapak [Mon, 28 Nov 2022 13:26:41 +0000 (14:26 +0100)]
docs: don't mention CLI only anymore for tuning options

since we now have those on the ui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agouse derive 'Default' for ChunkOrder
Dominik Csapak [Mon, 28 Nov 2022 13:26:40 +0000 (14:26 +0100)]
use derive 'Default' for ChunkOrder

instead of hardcoding the default deep inside the code. This makes it
much easier to see what is the actual default

the first instance of ChunkOrder::None was only for the test case, were
the ordering doe not matter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agoui: datastore tuning: show correct default option
Dominik Csapak [Mon, 28 Nov 2022 13:26:39 +0000 (14:26 +0100)]
ui: datastore tuning: show correct default option

the default in the backend is really 'inode' not 'none', so show that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agoui: datastore: override maintenance icon if currently destroying
Thomas Lamprecht [Mon, 28 Nov 2022 14:56:29 +0000 (15:56 +0100)]
ui: datastore: override maintenance icon if currently destroying

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoui: datastore: allow to destroy all underlying data on removal
Thomas Lamprecht [Mon, 28 Nov 2022 14:43:59 +0000 (15:43 +0100)]
ui: datastore: allow to destroy all underlying data on removal

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoui: datastore: factor out safe datastore destroy
Thomas Lamprecht [Mon, 28 Nov 2022 14:42:48 +0000 (15:42 +0100)]
ui: datastore: factor out safe datastore destroy

will extend it for data-destroy flag in a next commit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agofix #3335: allow removing datastore contents on delete
Wolfgang Bumiller [Fri, 25 Nov 2022 08:13:52 +0000 (09:13 +0100)]
fix #3335: allow removing datastore contents on delete

Adds an optional 'destroy-data' parameter to the datastore
remove api call.

Based-on: https://lists.proxmox.com/pipermail/pbs-devel/2022-January/004574.html
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoapi-types: add MaintenanceType::Delete
Wolfgang Bumiller [Fri, 25 Nov 2022 10:19:11 +0000 (11:19 +0100)]
api-types: add MaintenanceType::Delete

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoapi-types: derive Display and FromStr for MaintenanceType
Wolfgang Bumiller [Fri, 25 Nov 2022 10:18:56 +0000 (11:18 +0100)]
api-types: derive Display and FromStr for MaintenanceType

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoapi-types: make Operation Eq
Wolfgang Bumiller [Fri, 25 Nov 2022 10:18:40 +0000 (11:18 +0100)]
api-types: make Operation Eq

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoui: prune job edit: set correct onlineHelp reference
Thomas Lamprecht [Mon, 28 Nov 2022 13:43:07 +0000 (14:43 +0100)]
ui: prune job edit: set correct onlineHelp reference

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: add section for prune jobs
Thomas Lamprecht [Mon, 28 Nov 2022 13:42:45 +0000 (14:42 +0100)]
docs: add section for prune jobs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: update disks, datastore prune/GC and datastore options screenshots
Thomas Lamprecht [Mon, 28 Nov 2022 13:16:24 +0000 (14:16 +0100)]
docs: update disks, datastore prune/GC and datastore options screenshots

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoui: datastore options: use new onSetValues over setValues
Thomas Lamprecht [Mon, 28 Nov 2022 13:00:14 +0000 (14:00 +0100)]
ui: datastore options: use new onSetValues over setValues

The `onSetValues` (pedant to `onGetValues`) got added relatively
recently to widget toolkits input panel. Using it avoids the need to
hard-code some "dynamic override" calling semantics.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoui: datastore options: code style line reduction
Thomas Lamprecht [Mon, 28 Nov 2022 12:59:51 +0000 (13:59 +0100)]
ui: datastore options: code style line reduction

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoui: docs: update online help info
Thomas Lamprecht [Mon, 28 Nov 2022 12:52:48 +0000 (13:52 +0100)]
ui: docs: update online help info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoui: datastore: add tuning settings to datastore options
Dominik Csapak [Mon, 28 Nov 2022 10:13:06 +0000 (11:13 +0100)]
ui: datastore: add tuning settings to datastore options

Add a simple edit window with 2 combo boxes for `sync-level` and
`chunk-order`.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: rework commit message/subject a bit ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: storage: remove duplicate screenshot, link remaining one
Thomas Lamprecht [Mon, 28 Nov 2022 11:47:16 +0000 (12:47 +0100)]
docs: storage: remove duplicate screenshot, link remaining one

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: ransomeware: rework structure and expand
Thomas Lamprecht [Mon, 28 Nov 2022 11:11:18 +0000 (12:11 +0100)]
docs: ransomeware: rework structure and expand

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: maintenance: add prune job reference and update title
Thomas Lamprecht [Mon, 28 Nov 2022 11:09:33 +0000 (12:09 +0100)]
docs: maintenance: add prune job reference and update title

this section needs general rework/expansion but to be able to link to
it already now add a reference and only do a minimal title update.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: ransom ware: fix some typos commented in review
Thomas Lamprecht [Mon, 28 Nov 2022 09:46:50 +0000 (10:46 +0100)]
docs: ransom ware: fix some typos commented in review

Note that the diff is bigger due to quite some text re-flow.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: ransom ware: reflow text to our 80cc
Thomas Lamprecht [Mon, 28 Nov 2022 09:25:23 +0000 (10:25 +0100)]
docs: ransom ware: reflow text to our 80cc

and drop some trailing whitespace while at it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agodocs: add section on ransomware and PBS help against it
Noel Ullreich [Fri, 25 Nov 2022 12:10:34 +0000 (13:10 +0100)]
docs: add section on ransomware and PBS help against it

Added a section on ransomware. This includes a bullet point in the
main features section and a section in the backup storage section.
The latter section lists mitigation resources in pbs as well as best
practices.

Updated capitalization to be consistent in main features. Imo, since
these are bullet points and not headings, they should be in lowercase

Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
Reviewed-by: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Stefan Sterz <s.sterz@proxmox.com>
23 months agodatastore: make 'filesystem' the default sync-level
Dominik Csapak [Fri, 4 Nov 2022 09:49:34 +0000 (10:49 +0100)]
datastore: make 'filesystem' the default sync-level

rationale is that it makes the backup much safer than 'none', but does not
incur a big of a performance hit as 'file'.

here some benchmark:

data to be backed up:
~14GiB semi-random test images between 12kiB and 4GiB
that results in ~11GiB chunks (more than ram available on the target)

PBS setup:
virtualized (on an idle machine), PBS itself was also idle
8 cores (kvm64 on Intel 12700k) and 8 GiB memory

all virtual disks are on LVM with discard and iothread on
the HDD is a 4TB Seagate ST4000DM000 drive, and the NVME is a 2TB
Crucial CT2000P5PSSD8

i tested each disk with ext4/xfs/zfs (default created with the gui)
with 5 runs each, inbetween the caches are flushed and the filesystem synced
i removed the biggest and smallest result and from the remaining 3
results built the average (percentage is relative to the 'none' result)

result:

test         none     filesystem         file
hdd - ext4   125.67s  140.39s (+11.71%)  358.10s (+184.95%)
hdd - xfs    92.18s   102.64s (+11.35%)  351.58s (+281.41%)
hdd - zfs    94.82s   104.00s (+9.68%)   309.13s (+226.02%)
nvme - ext4  60.44s   60.26s (-0.30%)    60.47s (+0.05%)
nvme - xfs   60.11s   60.47s (+0.60%)    60.49s (+0.63%)
nvme - zfs   60.83s   60.85s (+0.03%)    60.80s (-0.05%)

So all in all, it does not seem to make a difference for nvme drives,
for hdds 'filesystem' increases backup time by ~10%, while
for 'file' it largely depends on the filesystem, but always
in the range of factor ~3 - ~4

Note that this does not take into account parallel actions, such as gc,
verify or other backups.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agod/control: bump version dependency for widget-toolkit 3.5.2
Thomas Lamprecht [Mon, 28 Nov 2022 08:23:10 +0000 (09:23 +0100)]
d/control: bump version dependency for widget-toolkit 3.5.2

to ensure that the moved CSS rules are installed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoui: css: move action columns fix to widget-toolkit
Matthias Heiserer [Fri, 7 Oct 2022 11:18:59 +0000 (13:18 +0200)]
ui: css: move action columns fix to widget-toolkit

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2 years agodatastore: actually hold the active operation file lock on update
Wolfgang Bumiller [Fri, 25 Nov 2022 09:35:43 +0000 (10:35 +0100)]
datastore: actually hold the active operation file lock on update

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agofix active state when reading task logs
Wolfgang Bumiller [Fri, 25 Nov 2022 12:39:43 +0000 (13:39 +0100)]
fix active state when reading task logs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump version to 2.2.8-1
Thomas Lamprecht [Thu, 24 Nov 2022 16:41:51 +0000 (17:41 +0100)]
bump version to 2.2.8-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years ago prune jobs: switch default to on-error-only notifications
Thomas Lamprecht [Thu, 24 Nov 2022 16:32:03 +0000 (17:32 +0100)]
 prune jobs: switch default to on-error-only notifications

we can still do that as notifications for prune jobs weren't released
yet.

We may want to evaluate if we adapt (some) other notification types
too on next major release.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: nav tree: move config sets to top of the class
Thomas Lamprecht [Thu, 24 Nov 2022 15:53:22 +0000 (16:53 +0100)]
ui: nav tree: move config sets to top of the class

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>