]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
7 months agosystem report: support outputting all files in a directory
Thomas Lamprecht [Thu, 26 Oct 2023 12:40:50 +0000 (14:40 +0200)]
system report: support outputting all files in a directory

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agosystem report: group files by categories
Thomas Lamprecht [Thu, 26 Oct 2023 10:37:08 +0000 (12:37 +0200)]
system report: group files by categories

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agosystem report: switch to markdown-like output
Thomas Lamprecht [Thu, 26 Oct 2023 10:33:48 +0000 (12:33 +0200)]
system report: switch to markdown-like output

allows one to render this via any of the thousands markdown viewers to
get a better formatting.

We can switch our web ui widget to (optionally) render this as html
when a user is viewing it from the UI too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agosystem report: output ldap and oidc realm list
Thomas Lamprecht [Thu, 26 Oct 2023 10:31:44 +0000 (12:31 +0200)]
system report: output ldap and oidc realm list

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agosystem report: add more information to lsblk
Thomas Lamprecht [Thu, 26 Oct 2023 09:32:27 +0000 (11:32 +0200)]
system report: add more information to lsblk

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agofix #4779: client: add missing "Connection" header for HTTP2 upgrade
Max Carrara [Thu, 19 Oct 2023 08:57:24 +0000 (10:57 +0200)]
fix #4779: client: add missing "Connection" header for HTTP2 upgrade

This commit adds the missing "Connection: upgrade" HTTP header [1]
when requesting an upgrade to HTTP 2.
Doing so is mandated in the HTTP Semantics RFC [2], and without this,
(reverse) proxies that strictly follow the standard could potentially
break.

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Upgrade
[2]: RFC 9110, 7.8. Upgrade: “[...] sender of Upgrade MUST also send
     an "Upgrade" connection option in the Connection header [...]”

Reported-By: McTwist <rajb89@hotmail.com>
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
 [ TL: added RFC reference and use case to commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agodatastore: catalog: added lifetime to find function
Gabriel Goller [Mon, 18 Sep 2023 13:41:09 +0000 (15:41 +0200)]
datastore: catalog: added lifetime to find function

Added lifetime to `find` function. We need this lifetime
because of the `impl MatchList` and 'anonymous lifetimes in
`impl Trait` are unstable'.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
7 months agobump pathpatterns to 0.3
Wolfgang Bumiller [Thu, 19 Oct 2023 09:12:35 +0000 (11:12 +0200)]
bump pathpatterns to 0.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
7 months agoclient: forget snapshots: function signature returns no value
Thomas Lamprecht [Wed, 18 Oct 2023 09:04:35 +0000 (11:04 +0200)]
client: forget snapshots: function signature returns no value

Switch from serde_json::Value to an empty tuple, to not suggest this
actually returns a value from the API other than a possible error.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agofix #4971: client: Improve output on successful snapshot deletion
Philipp Hufnagl [Mon, 16 Oct 2023 11:40:15 +0000 (13:40 +0200)]
fix #4971: client: Improve output on successful snapshot deletion

When a snapshot gets deleted (forgotten), the proxmox backup client
currently returns returns
"Result: {
  "data": null
}"

This feedback may confuse users therefore this patch removes the output.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
7 months agoTrafficControlCurrentRate: derive Clone and PartalEq (for GUI)
Dietmar Maurer [Sun, 15 Oct 2023 09:09:42 +0000 (11:09 +0200)]
TrafficControlCurrentRate: derive Clone and PartalEq (for GUI)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
7 months agomove TrafficControlCurrentRate to pbs-api-types
Dietmar Maurer [Sun, 15 Oct 2023 09:07:30 +0000 (11:07 +0200)]
move TrafficControlCurrentRate to pbs-api-types

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
7 months agoTrafficControlRule: derive Clone and PartialEq (for GUI)
Dietmar Maurer [Sun, 15 Oct 2023 07:25:26 +0000 (09:25 +0200)]
TrafficControlRule: derive Clone and PartialEq (for GUI)

7 months agoui: update generated OnlineHelpInfo map
Thomas Lamprecht [Fri, 13 Oct 2023 15:22:19 +0000 (17:22 +0200)]
ui: update generated OnlineHelpInfo map

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agoui: renamed pmx-faded to pmx-opacity-75
Thomas Lamprecht [Fri, 13 Oct 2023 15:16:54 +0000 (17:16 +0200)]
ui: renamed pmx-faded to pmx-opacity-75

"Nomen est omen" and go for three quarter while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agofix #4260: ui: fallback to note of last snapshot for backup group comment
Philipp Hufnagl [Fri, 13 Oct 2023 14:37:55 +0000 (16:37 +0200)]
fix #4260: ui: fallback to note of last snapshot for backup group comment

When there is no comment for a backup group, the comment of the last
(most recent) snapshot in this group will be shown as dimmed text, as
long as the back group is collapsed.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
7 months agoInterface: add missing serde skip_serializing_if to bond_xmit_hash_policy
Dietmar Maurer [Thu, 12 Oct 2023 10:39:18 +0000 (12:39 +0200)]
Interface: add missing serde skip_serializing_if to bond_xmit_hash_policy

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
7 months agoInterface: fix deserialize (add default)
Dietmar Maurer [Wed, 11 Oct 2023 09:38:01 +0000 (11:38 +0200)]
Interface: fix deserialize (add default)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
7 months agoInterface: derive Clone + PartialEq (for GUI)
Dietmar Maurer [Wed, 11 Oct 2023 09:37:15 +0000 (11:37 +0200)]
Interface: derive Clone + PartialEq (for GUI)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
7 months agomove MetricServerInfo definition to pbs-api-types
Dietmar Maurer [Mon, 9 Oct 2023 06:17:46 +0000 (08:17 +0200)]
move MetricServerInfo definition to pbs-api-types

And derive Clone, Eq and Ord so that we can sort the list in the GUI.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
8 months agoui: tape restore: fix default namespace mapping
Dominik Csapak [Mon, 2 Oct 2023 07:52:29 +0000 (09:52 +0200)]
ui: tape restore: fix default namespace mapping

the ui shows the default 'root' namespace as target, but this only
worked when no namespace was selected. as soon as one source datastore
had a target namespace selected, the others datastores would be
skipped as there was no namespace mapping for them. To fix that, we
simply send a default namespace mapping for each source datastore
without a target (no target means 'root')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
8 months agoAdd build outputs to .gitignore
Stefan Lendl [Tue, 3 Oct 2023 10:17:31 +0000 (12:17 +0200)]
Add build outputs to .gitignore

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
8 months agobuild: remove references to proxmox-backup-debug package
Fabian Grünbichler [Tue, 3 Oct 2023 09:18:25 +0000 (11:18 +0200)]
build: remove references to proxmox-backup-debug package

this only existed for a week ~2 years ago[0], making those two variables empty.

0: removed in 67d00d5c0e81246dd43f2ee972504cb3a00ade8f

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agobump version to 3.0.4-1
Fabian Grünbichler [Mon, 2 Oct 2023 08:20:41 +0000 (10:20 +0200)]
bump version to 3.0.4-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agoupdate to env_logger 0.10
Fabian Grünbichler [Mon, 2 Oct 2023 08:18:14 +0000 (10:18 +0200)]
update to env_logger 0.10

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agopbs-api-types: move node status types from src/api2/types/mod.rs
Dietmar Maurer [Wed, 27 Sep 2023 16:11:58 +0000 (18:11 +0200)]
pbs-api-types: move node status types from src/api2/types/mod.rs

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
8 months agod/changelog: fix typos
Thomas Lamprecht [Wed, 27 Sep 2023 16:34:59 +0000 (18:34 +0200)]
d/changelog: fix typos

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agobump version to 3.0.3-1
Thomas Lamprecht [Wed, 27 Sep 2023 16:20:02 +0000 (18:20 +0200)]
bump version to 3.0.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoclient: task polling: rework code to be slightly more readable
Thomas Lamprecht [Wed, 27 Sep 2023 16:14:57 +0000 (18:14 +0200)]
client: task polling: rework code to be slightly more readable

the match-arms let one follow the different branches easier than the
relatively crowded if-condition it replaces.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoclient: do exit with failure code when task finished with warnings
Gabriel Goller [Wed, 27 Sep 2023 15:32:27 +0000 (17:32 +0200)]
client: do exit with failure code when task finished with warnings

Warnings in the task log/state normally means that the task actually
did its main job, but there was some detected (potential) issue that
the users should be made aware of. Exiting with an error code in that
case would be a bit odd.

While just exiting with success might not be the best solution either,
it's definitively more correct than a failure-exit-code, so go for
that for now as a stop-gap.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
 [ TL: rebased on current master (v3 was already applied) and rewrite
   commit message accordingly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agofix #4895: scheduled jobs: ignore task-log not found error
Gabriel Goller [Wed, 20 Sep 2023 14:11:24 +0000 (16:11 +0200)]
fix #4895: scheduled jobs: ignore task-log not found error

Use the job start-time as end-time when it's stuck in the
`JobState::Starting` state, no active working is running and the task
log of the last run doesn't exists.

A user experienced a power loss, which left a GC job in the `Started`
state, but the task log did not exist. This breaks the schedule and no
following GC runs. Now, the error is simply ignored and a new gc job
is started on the next occurrence.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
8 months agofix #4823: datastore: ignore vanished files when walking directory
Gabriel Goller [Fri, 8 Sep 2023 12:56:10 +0000 (14:56 +0200)]
fix #4823: datastore: ignore vanished files when walking directory

When walking through a datastore on a GC run, it can
happen that the snapshot is deleted, and then walked over.
For example:
- read dir entry for group
- walk entries (snapshots)
- snapshot X is removed/pruned
- walking reaches snapshot X, but ENOENT
Previously we bailed here, now we just ignore it.
Backups that are just created (and a atomic rename from
tmpdir happens, which might triggers a ENOENT error) are
not a problem here, the GC handles them separately.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
8 months agofix #4343: updated `view_task_result` to bail on task failure
Gabriel Goller [Fri, 8 Sep 2023 13:32:19 +0000 (15:32 +0200)]
fix #4343: updated `view_task_result` to bail on task failure

Now we make an additional request on `api2/json/.../tasks/{upid}/status` to
get the `exitstatus` of the task. This allows us to `bail` and thus
get a non-zero exit code in the cli.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
8 months agoclose #3777: Add source information to backup logs
Gabriel Goller [Fri, 8 Sep 2023 14:01:14 +0000 (16:01 +0200)]
close #3777: Add source information to backup logs

This will show the ip-address of the client creating
the backup in the logs. For example it will output:
"starting new backup on datastore 'test1' from ::ffff:192.168.1.192:
"host/test/2023-08-21T07:28:10Z"".

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
8 months agogc: improve lost+found comment
Fabian Grünbichler [Tue, 12 Sep 2023 09:29:11 +0000 (11:29 +0200)]
gc: improve lost+found comment

this sounded like we need to skip lost+found to avoid pruning too many chunks,
while the opposite is true - it's safe to skip lost+found on EPERM without
pruning too many chunks, but this is not the case for all EPERM situations..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agogc: fix ignoring if `lost+found` can't be accessed
Hannes Laimer [Tue, 12 Sep 2023 09:18:49 +0000 (11:18 +0200)]
gc: fix ignoring if `lost+found` can't be accessed

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Fixes: e2516f61a860eae59395a3a990d9abe4c445ce8c
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agodatastore: list images: reduce indentation depth on error checking
Thomas Lamprecht [Fri, 8 Sep 2023 09:01:28 +0000 (11:01 +0200)]
datastore: list images: reduce indentation depth on error checking

Simply pull out the inner IO error and the affected path first.

Clean up style-wise a bit while touching this anyway, but no semantic
change intended.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoremove unnecessary characters in description
Markus Frank [Mon, 4 Sep 2023 09:53:14 +0000 (11:53 +0200)]
remove unnecessary characters in description

remove ." in description of delete_datastore_disk

Signed-off-by: Markus Frank <m.frank@proxmox.com>
8 months agoui: don't show reset button on zfs creation
Dominik Csapak [Thu, 7 Sep 2023 12:19:32 +0000 (14:19 +0200)]
ui: don't show reset button on zfs creation

the reset button only makes sense for editing existing entries,
not for creating new.

This brings it inline with the ZFS create window from PVE.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
8 months agoCargo.toml: sort dependencies
Fabian Grünbichler [Wed, 6 Sep 2023 09:56:59 +0000 (11:56 +0200)]
Cargo.toml: sort dependencies

both into the correct "category" and alphabetically within.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agocargo: fixed cargo.toml local paths
Gabriel Goller [Wed, 30 Aug 2023 12:57:28 +0000 (14:57 +0200)]
cargo: fixed cargo.toml local paths

The `proxmox-apt` and `proxmox-openid` crate was moved into
the `proxmox` workspace.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
9 months agoAclListItem: derive Clone and PartialEq
Dietmar Maurer [Sat, 2 Sep 2023 14:24:18 +0000 (16:24 +0200)]
AclListItem: derive Clone and PartialEq

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
9 months agoTaskListItem: derive Clone and PartialEq
Dietmar Maurer [Wed, 30 Aug 2023 11:34:51 +0000 (13:34 +0200)]
TaskListItem: derive Clone and PartialEq

9 months agominor style cleanup
Wolfgang Bumiller [Thu, 24 Aug 2023 08:28:11 +0000 (10:28 +0200)]
minor style cleanup

The match condition has gotten a bit large, and the error case is a
bit more concise with a pattern guard.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agocleanup: drop unnecessary to_owned call
Wolfgang Bumiller [Thu, 24 Aug 2023 08:28:01 +0000 (10:28 +0200)]
cleanup: drop unnecessary to_owned call

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agobump pathpatterns dependency to 0.2
Wolfgang Bumiller [Thu, 24 Aug 2023 08:20:08 +0000 (10:20 +0200)]
bump pathpatterns dependency to 0.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agofix #4380: check if file is excluded before running `stat()`
Gabriel Goller [Tue, 22 Aug 2023 14:05:17 +0000 (16:05 +0200)]
fix #4380: check if file is excluded before running `stat()`

Passed a closure with the `stat()` function call to `matches()`. This
will traverse through all patterns and try to match using the path only, if a
`file_mode` is needed, it will run the closure. This means that if we exclude
a file with the `MatchType::ANY_FILE_TYPE`, we will skip it without running
`stat()` on it. As we updated the `matches()` function, we also updated all the
invocations of it.
Added `pathpatterns` crate to local overrides in cargo.toml.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
9 months agodocs: update external link to www.proxmox.com
Christian Ebner [Fri, 11 Aug 2023 11:09:05 +0000 (13:09 +0200)]
docs: update external link to www.proxmox.com

During the redesign of www.proxmox.com the menu structure and therefore
some url changed. Update the external link in order to avoid an
unneccessary redirect.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
9 months agoshorten code a tiny bit
Wolfgang Bumiller [Thu, 17 Aug 2023 12:03:52 +0000 (14:03 +0200)]
shorten code a tiny bit

Ends up with a rather long pattern guard but does avoid the return
case duplication...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agofix: #4761: introduce overwrite bitflags for fine grained overwrites
Christian Ebner [Wed, 16 Aug 2023 09:57:46 +0000 (11:57 +0200)]
fix: #4761: introduce overwrite bitflags for fine grained overwrites

Adds OverwriteFlags for granular control of which entry types should
overwrite entries present on the filesystem during a restore.

The original overwrite flag is refactored in order to cover all of the
other cases.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
9 months agofix: #4761: unlink existing entries for hard/symlinks when overwrite
Christian Ebner [Wed, 16 Aug 2023 09:57:45 +0000 (11:57 +0200)]
fix: #4761: unlink existing entries for hard/symlinks when overwrite

Creating symlinks or hardlinks might fail if a directory entry with the
same name is already present on the filesystem during restore.

When the overwrite flag is given, on failure unlink the existing entry
(except directories) and retry hard/symlink creation.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
9 months agopbs2to3: fix boot-mode detection
Stoiko Ivanov [Wed, 9 Aug 2023 10:34:26 +0000 (10:34 +0000)]
pbs2to3: fix boot-mode detection

/sys/firmware/efi is a directory and std::path::Path seems to detect
only regular files with is_file [0].

Reported in our Enterprise support portal.

Quickly tested the fix on a VM.

https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.is_file

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
9 months agofix: api-types: add support for lto 9 tape density
Stefan Sterz [Thu, 10 Aug 2023 15:37:04 +0000 (17:37 +0200)]
fix: api-types: add support for lto 9 tape density

lto 9 tapes have a new density code which leads to these tapes not
being recognized properly. add the new density code and TapeDensity to
improve lto 9 support. since the documentation states that we support
lto 5 and above this constitutes a bug fix for lto 9 support.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
9 months agofix #4868: bump proxmox-apt dependency, also bump proxmox-ldap dep
Wolfgang Bumiller [Tue, 8 Aug 2023 12:12:20 +0000 (14:12 +0200)]
fix #4868: bump proxmox-apt dependency, also bump proxmox-ldap dep

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agoblobs: fix outdated comment about file format
Fabian Grünbichler [Thu, 20 Jul 2023 10:23:56 +0000 (12:23 +0200)]
blobs: fix outdated comment about file format

the wrong info here was rather misleading, especially when encountering errors
just talking about "blobs" when the actual problem is with a chunk.

chunks did originally have their own magic values, but that got removed in

4ee8f53d07bf0becf19a22cf4f4674558a4d128c "remove DataChunk file format - use DataBlob instead"

back in 2019, before the 0.1.1 release(!)

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
9 months agoblob/chunk parse errors: add context
Fabian Grünbichler [Thu, 20 Jul 2023 10:23:55 +0000 (12:23 +0200)]
blob/chunk parse errors: add context

to make it more obvious that blob is a chunk here and which one is affected.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
9 months agoapi-types: drop unused leftover file
Christoph Heiss [Mon, 7 Aug 2023 07:57:24 +0000 (09:57 +0200)]
api-types: drop unused leftover file

Commit d97ff8ae ("use new auth api crate") moved all auth-related code
into it's own crate inside the `proxmox` repo, including this file. Thus
drop it here, it's not even included in the compile.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
9 months agocargo: added other shared crates to local path overrides
Gabriel Goller [Mon, 7 Aug 2023 13:38:29 +0000 (15:38 +0200)]
cargo: added other shared crates to local path overrides

Added proxmox-ldap, -metrics, -sortable-metrics and -human-bytes to local
path overrides.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
9 months agocargo: fixed cargo local path overrides
Gabriel Goller [Mon, 7 Aug 2023 13:38:28 +0000 (15:38 +0200)]
cargo: fixed cargo local path overrides

The crates `proxmox-apt` and `proxmox-openid` have been moved to the `proxmox`
workspace. Adjusted the path in the Cargo.toml file.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
9 months agodocs: updated README.rst build guide
Gabriel Goller [Mon, 7 Aug 2023 13:49:24 +0000 (15:49 +0200)]
docs: updated README.rst build guide

 - we use the debian 12 bookworm mirror
 - `make deb-all` doesn't exist anymore, `make deb` builds everything

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
10 months agoRevert "fix #4380: stat() is run when file is executed"
Fabian Grünbichler [Fri, 4 Aug 2023 08:33:15 +0000 (10:33 +0200)]
Revert "fix #4380: stat() is run when file is executed"

this actually affected the matcher's ability to differentiate between directory
and file patterns, and the alternative would require matching patterns twice
for full coverage, so let's try a different approach altogether.

This reverts commit c8ed10095d4cdc01705e5f01f849f8850a0b7395.

10 months agofix #4380: stat() is run when file is executed
Gabriel Goller [Thu, 3 Aug 2023 15:22:38 +0000 (17:22 +0200)]
fix #4380: stat() is run when file is executed

When executing `proxmox-backup-client backup ...
--exclude "test/test.txt"` it still executed stat() on "test.txt",
which won't work when the current user doesn't have access to the
file or the parent folder. Now we check if the file is excluded,
and if it is not, then we execute stat().

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
10 months agobump version to 3.0.2-1
Fabian Grünbichler [Tue, 1 Aug 2023 09:55:46 +0000 (11:55 +0200)]
bump version to 3.0.2-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10 months agohandle pve-kernel -> proxmox-kernel rename
Fabian Grünbichler [Tue, 18 Jul 2023 08:33:01 +0000 (10:33 +0200)]
handle pve-kernel -> proxmox-kernel rename

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10 months agoapi-types: set serde defaults for UserWithTokens
Wolfgang Bumiller [Tue, 1 Aug 2023 07:10:45 +0000 (09:10 +0200)]
api-types: set serde defaults for UserWithTokens

since `totp_locked` is not wrapped in an `Option` we need to
explicitly tell serde about its default

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agobump dependencies to bookworm updates
Wolfgang Bumiller [Mon, 24 Jul 2023 09:12:56 +0000 (11:12 +0200)]
bump dependencies to bookworm updates

These should all be api compatible but still needed a bookworm bump.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agobackup: improve skipped download error message
Fabian Grünbichler [Wed, 19 Jul 2023 09:06:31 +0000 (11:06 +0200)]
backup: improve skipped download error message

context always helps when parsing output..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10 months agofix #4591: pbs-client: backup_writer: improve error reporting
Maximiliano Sandoval [Wed, 7 Jun 2023 14:07:01 +0000 (16:07 +0200)]
fix #4591: pbs-client: backup_writer: improve error reporting

We check if the manifest contains an index for the requested archive, if
it does not we avoid downloading it and report a more helpful error
message.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
10 months agopbs-client: backup-writer: use log::warn instead of eprintln!
Maximiliano Sandoval [Wed, 7 Jun 2023 14:07:00 +0000 (16:07 +0200)]
pbs-client: backup-writer: use log::warn instead of eprintln!

The errors are not fatal so we only throw a warning.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
10 months agodocs: replace concrete device paths with pseudo paths
Philipp Hufnagl [Tue, 11 Jul 2023 07:56:51 +0000 (09:56 +0200)]
docs: replace concrete device paths with pseudo paths

Having commonly used device paths (like /dev/sdb) in an example
command may cause damage if the user simply copies them without
checking. With a pseudo device path (like /dev/sdX), they would simply
get an error

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agoproxmox-backup-client: restore: add 'ignore-extract-device-errors' flag
Max Carrara [Mon, 17 Jul 2023 08:04:09 +0000 (10:04 +0200)]
proxmox-backup-client: restore: add 'ignore-extract-device-errors' flag

If this flag is provided, any errors that occur during the extraction
of a device node are silently ignored.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
10 months agopbs-client: pxar: add PxarExtractContext
Max Carrara [Mon, 17 Jul 2023 08:04:08 +0000 (10:04 +0200)]
pbs-client: pxar: add PxarExtractContext

This enum's purpose is to provide context to errors that occur during
the extraction of a pxar archive, making it possible to handle
extraction errors in a more granular manner.

For now, it's only implemented in `ExtractorIter::next()`, but may be
used in other places if necessary or desired.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
10 months agopbs-client: pxar: refactor body of `extract_archive` to `ExtractorIter`
Max Carrara [Mon, 17 Jul 2023 08:04:07 +0000 (10:04 +0200)]
pbs-client: pxar: refactor body of `extract_archive` to `ExtractorIter`

This change factors the body of `extract_archive()` into a separate
struct named `ExtractorIter` which implements the `Iterator` trait.

This refactor has two goals:
  * Make it easier to provide and propagate errors and additional
    information via `anyhow::Context`
  * Introduce a means to handle errors that occur during extraction,
    with the possibility to continue extraction if the handler decides
    that the error is not fatal

The latter point benefits from the information provided by the former;
previously, errors could only be handled in certain locations
(e.g. application of metadata), but not on a "per-entry" basis.

Since `extract_archive()` was already using a "desugared" version of
the iterator pattern to begin with, wrapping its body up in an actual
`Iterator` made the most sense, as it didn't require changing the already
existing control flow that much.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
10 months agopbs-client: pxar: preserve error context
Max Carrara [Mon, 17 Jul 2023 08:04:06 +0000 (10:04 +0200)]
pbs-client: pxar: preserve error context

In order to preserve the source(s) of errors, `anyhow::Context` is
used instead of propagating errors via `Result::map_err()` and / or
`anyhow::format_err!()`.

This makes it possible to access e.g. an underlying `io::Error` or
`nix::Errno` etc. that caused an execution path to fail.

Certain usages of `anyhow::bail!()` are also changed / replaced
in order to preserve context.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
10 months agofix pbs2to3 install
Fabian Grünbichler [Fri, 14 Jul 2023 10:10:24 +0000 (12:10 +0200)]
fix pbs2to3 install

was incomplete when forward porting from stable-2.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10 months agosync over pbs2to3 upgrade check-list script to master
Thomas Lamprecht [Sat, 8 Jul 2023 13:06:38 +0000 (15:06 +0200)]
sync over pbs2to3 upgrade check-list script to master

so that it's available after for post-upgrade checks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/control fixup and zstd simplify zstd version
Wolfgang Bumiller [Wed, 5 Jul 2023 13:24:22 +0000 (15:24 +0200)]
d/control fixup and zstd simplify zstd version

we transitively depend on a specific version anyway

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agobump d/control
Wolfgang Bumiller [Wed, 5 Jul 2023 13:00:14 +0000 (15:00 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agoreset tfa failure count when unlocking
Wolfgang Bumiller [Wed, 5 Jul 2023 12:58:54 +0000 (14:58 +0200)]
reset tfa failure count when unlocking

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agobump proxmox-tfa dep to 4.0.4
Wolfgang Bumiller [Wed, 5 Jul 2023 12:58:39 +0000 (14:58 +0200)]
bump proxmox-tfa dep to 4.0.4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agoencrypted backup: fix log message
Fabian Grünbichler [Mon, 3 Jul 2023 06:53:45 +0000 (08:53 +0200)]
encrypted backup: fix log message

the debug representation of a repository

 'BackupRepository { auth_id: Some(Authid { user: Userid { data: "test@pbs", name_len: 4 }, tokenname: None }), host: Some("127.0.0.1"), port: None, store: "tank" }'

is rather verbose and unreadable, use the plain one

 'test@pbs@127.0.0.1:8007:tank'

intead.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
11 months agodocs: update FAQ release support table, add PBS 2.x EOL date
Thomas Lamprecht [Wed, 28 Jun 2023 16:57:46 +0000 (18:57 +0200)]
docs: update FAQ release support table, add PBS 2.x EOL date

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>