]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
2 years agodatastore: add check for maintenance in lookup
Hannes Laimer [Tue, 12 Apr 2022 05:25:57 +0000 (05:25 +0000)]
datastore: add check for maintenance in lookup

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2 years agoapi-types: add maintenance type
Hannes Laimer [Tue, 12 Apr 2022 05:25:56 +0000 (05:25 +0000)]
api-types: add maintenance type

+ bump proxmox-schema dep to 1.2.1 (for quoted property string)

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2 years agoui: node config: avoid split listeners
Thomas Lamprecht [Mon, 11 Apr 2022 09:09:38 +0000 (11:09 +0200)]
ui: node config: avoid split listeners

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoclient: drop unnecessary clone
Wolfgang Bumiller [Tue, 12 Apr 2022 10:34:52 +0000 (12:34 +0200)]
client: drop unnecessary clone

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotree wide: some stylistic clippy fixes
Thomas Lamprecht [Sun, 10 Apr 2022 16:33:32 +0000 (18:33 +0200)]
tree wide: some stylistic clippy fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi types: rust fmt
Thomas Lamprecht [Sun, 10 Apr 2022 15:53:42 +0000 (17:53 +0200)]
api types: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocli: backup manager: rust fmt
Thomas Lamprecht [Sun, 10 Apr 2022 15:50:35 +0000 (17:50 +0200)]
cli: backup manager: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotests: rust fmt
Thomas Lamprecht [Sun, 10 Apr 2022 15:49:26 +0000 (17:49 +0200)]
tests: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotape: rust fmt
Thomas Lamprecht [Sun, 10 Apr 2022 15:49:03 +0000 (17:49 +0200)]
tape: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorestore daemon: rust fmt
Thomas Lamprecht [Sun, 10 Apr 2022 15:47:20 +0000 (17:47 +0200)]
restore daemon: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoexamples: rust fmt
Thomas Lamprecht [Sun, 10 Apr 2022 15:44:34 +0000 (17:44 +0200)]
examples: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorest server: log rotation: refactor and comment improvements
Thomas Lamprecht [Thu, 7 Apr 2022 12:04:18 +0000 (14:04 +0200)]
rest server: log rotation: refactor and comment improvements

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorest server: log rotation: fix off-by-one for max_days
Thomas Lamprecht [Thu, 7 Apr 2022 10:57:03 +0000 (12:57 +0200)]
rest server: log rotation: fix off-by-one for max_days

The entries in a file go from oldest end-time in the first time to
newest end-time in the last line. So, just because the first line is
older than the cut-off time, the remaining one doesn't necessarily
have to be old enough too. What we can know for sure that older than
the current checked rotations of the task archive are definitively up
for deletion.

Another possibility would be to check the last line, but as scanning
backwards is more expensive/complex to do while only being an actual
improvement in a very specific edge case (it's more likely to have a
mixed time-cutoff vs. task-log-file boundary than that those are
aligned)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorest-server: add option to rotate task logs by 'max_days' instead of 'max_files'
Dominik Csapak [Mon, 28 Mar 2022 07:54:19 +0000 (09:54 +0200)]
rest-server: add option to rotate task logs by 'max_days' instead of 'max_files'

and use it with the configurable: 'task_log_max_days' of the node config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoconfig/node: add 'task_log_max_days' config
Dominik Csapak [Mon, 28 Mar 2022 07:54:18 +0000 (09:54 +0200)]
config/node: add 'task_log_max_days' config

to be able to configure the maximum days to keep task logs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agorest-server: cleanup_old_tasks: improve error handling
Dominik Csapak [Mon, 28 Mar 2022 07:54:17 +0000 (09:54 +0200)]
rest-server: cleanup_old_tasks: improve error handling

by not bubbling up most errors, and continuing on. this avoids that we
stop cleaning up because e.g. one directory was missing.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agopbs tape: rust fmt
Thomas Lamprecht [Wed, 6 Apr 2022 15:00:29 +0000 (17:00 +0200)]
pbs tape: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopbs fuse loop: rust fmt
Thomas Lamprecht [Wed, 6 Apr 2022 14:59:54 +0000 (16:59 +0200)]
pbs fuse loop: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodocs: client: file exclusion: add note about leading slash
Fabian Ebner [Mon, 28 Mar 2022 08:16:34 +0000 (10:16 +0200)]
docs: client: file exclusion: add note about leading slash

It's not documented yet and not intuitive:
https://forum.proxmox.com/threads/98810
https://forum.proxmox.com/threads/107143

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agopxar: create: add entry: fix anchored path pattern matching
Fabian Ebner [Mon, 28 Mar 2022 11:11:03 +0000 (13:11 +0200)]
pxar: create: add entry: fix anchored path pattern matching

Similar to 874bd545 ("pxar: fix anchored exclusion at archive root"),
but this time for inclusion. Because of the inconsistency, it could
happen that a file included in generate_directory_file_list() got
excluded in add_entry(), e.g. with a .pxarexclude file like
> *
> !/supposed-to-be-included

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agopxar bin: rust fmt
Thomas Lamprecht [Wed, 6 Apr 2022 14:58:04 +0000 (16:58 +0200)]
pxar bin: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopbs build config: rust fmt
Thomas Lamprecht [Wed, 6 Apr 2022 14:57:36 +0000 (16:57 +0200)]
pbs build config: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofile restore: rust fmt
Thomas Lamprecht [Wed, 6 Apr 2022 14:57:07 +0000 (16:57 +0200)]
file restore: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorrd: rust fmt
Thomas Lamprecht [Wed, 6 Apr 2022 14:56:33 +0000 (16:56 +0200)]
rrd: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorest server: rust fmt
Thomas Lamprecht [Wed, 6 Apr 2022 14:55:39 +0000 (16:55 +0200)]
rest server: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agouse BufReader/Writer for Files passed to serde_json::from_reader/writer
Wolfgang Bumiller [Wed, 6 Apr 2022 12:51:12 +0000 (14:51 +0200)]
use BufReader/Writer for Files passed to serde_json::from_reader/writer

As serde_json will otherwise read files 1 byte at a time.
Writing is a bit better, but syntacitcal elements (quotes, braces,
commas) still often show up as single write syscalls, so use BufWriter
there as well.

Note that while we do store the file in the resulting objects, we do not
need to keep the buffered read/writers as we always `seek` to the
beginning on further file operations.

Reported-by: Mark Schouten <mark@tuxis.nl>
Link: https://lists.proxmox.com/pipermail/pbs-devel/2022-April/004909.html
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi: tape: rust format
Thomas Lamprecht [Wed, 6 Apr 2022 14:31:49 +0000 (16:31 +0200)]
api: tape: rust format

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocli: tape: rust format
Thomas Lamprecht [Wed, 6 Apr 2022 14:27:32 +0000 (16:27 +0200)]
cli: tape: rust format

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotape: key recovery: refcator and split string/file case for cli params
Thomas Lamprecht [Wed, 6 Apr 2022 14:18:05 +0000 (16:18 +0200)]
tape: key recovery: refcator and split string/file case for cli params

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3854 paperkey import to proxmox-tape
Markus Frank [Thu, 24 Mar 2022 11:49:30 +0000 (12:49 +0100)]
fix #3854 paperkey import to proxmox-tape

added a parameter to the cli for importing tape key via a json-parameter or
via reading a exported paperkey-file or json-file.
For this i also added a backupkey parameter to the api, but here it only
accepts json.

The cli interprets the parameter first as json-string, then json-file
and last as paperkey-file.

functionality:
proxmox-tape key paperkey [fingerprint of existing key] > paperkey.backup
proxmox-tape key restore --backupkey paperkey.backup # key from line above
proxmox-tape key restore --backupkey paperkey.json # only the json
proxmox-tape key restore --backupkey '{"kdf": {"Scrypt": ...' # json as string

for importing the key as paperkey-file it is irrelevant, if the paperkey got exported as html
or txt.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
2 years agopbs-client: print error when we couldn't download previous fidx/didx
Dominik Csapak [Mon, 4 Apr 2022 11:45:02 +0000 (13:45 +0200)]
pbs-client: print error when we couldn't download previous fidx/didx

When we have a previous manifest, we try to download the fidx/didx files
to get the known chunks list. We continue if that fails (which is ok),
but we did not print any error, leading to a confusing backup output,
since the users would expect that chunks will be reused.

Printing the error should at least make it apparent that something did
not work correctly.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agofix #3067: api: add support for multi-line comments in node.cfg
Stefan Sterz [Fri, 4 Mar 2022 11:31:57 +0000 (12:31 +0100)]
fix #3067: api: add support for multi-line comments in node.cfg

add support for multi-line comments to node.cfg and the api, similar to
how pve handles multi-line comments

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotools: improve PhantomData usage
Wolfgang Bumiller [Tue, 22 Mar 2022 11:41:14 +0000 (12:41 +0100)]
tools: improve PhantomData usage

The ticket doesn't contain a `T`, it's stringified. We only
produce a new T when verifying.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi: datastore_status: restore api/gui compatibility
Dominik Csapak [Tue, 22 Mar 2022 08:14:57 +0000 (09:14 +0100)]
api: datastore_status: restore api/gui compatibility

the latest changes to this api call changed/removed some things that
were actually necessary for the gui. Readd those and document them this
time.

The change from u64 to i64 limits us to 8EiB of Datastore sizes (instead if
16EiB) but if we reach that, we must adapt most other parts to use 128bit
sizes anyway

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agodatastore status: factor out api type DataStoreStatusListItem
Dietmar Maurer [Sun, 20 Mar 2022 08:36:03 +0000 (09:36 +0100)]
datastore status: factor out api type DataStoreStatusListItem

And use the rust type instead of json::Value.

2 years agofix #3934 tape owner-selector to Authid
Markus Frank [Wed, 16 Mar 2022 09:09:46 +0000 (10:09 +0100)]
fix #3934 tape owner-selector to Authid

changed pmxUserSelector to pbsAuthidSelector, because it is currently
not possible to restore with a api token via gui.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
2 years agoui: fix panel height in the dashboard
Stefan Sterz [Thu, 10 Mar 2022 11:27:48 +0000 (12:27 +0100)]
ui: fix panel height in the dashboard

this fixes an issue where the layout looks misaligned in three column
layouts

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2 years agotape, docs, api: fix miscellaneous typos
Stefan Sterz [Thu, 10 Mar 2022 14:10:32 +0000 (15:10 +0100)]
tape, docs, api: fix miscellaneous typos

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoconfig: don't manually track padding size
Wolfgang Bumiller [Thu, 3 Mar 2022 14:00:05 +0000 (15:00 +0100)]
config: don't manually track padding size

make ConfigVersionCacheData a #[repr(C)] union to fix its
size and let it transparently `Deref{,Mut}` to its actual
contents

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodocs: tape: minor wording tweaks
Thomas Lamprecht [Wed, 9 Mar 2022 09:44:36 +0000 (10:44 +0100)]
docs: tape: minor wording tweaks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodocs: improve tape-backup examples
Dominik Csapak [Tue, 1 Mar 2022 12:11:12 +0000 (13:11 +0100)]
docs: improve tape-backup examples

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoproxmox-backup-debug api: fewer cloning
Wolfgang Bumiller [Wed, 9 Mar 2022 08:55:37 +0000 (09:55 +0100)]
proxmox-backup-debug api: fewer cloning

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-backup-debug api: rustfmt fixes
Dominik Csapak [Tue, 8 Mar 2022 12:20:57 +0000 (13:20 +0100)]
proxmox-backup-debug api: rustfmt fixes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-backup-debug api: parse parameters before sending to api
Dominik Csapak [Tue, 8 Mar 2022 12:20:56 +0000 (13:20 +0100)]
proxmox-backup-debug api: parse parameters before sending to api

when we use http to make the api call, we have to parse the parameters
before, else we might send the string "true" instead of the boolean true
and the api rejects it with a 'Parameter verification error'.

We already have all api call schemas here, so parsing is possible.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoregex: bump to 1.5.5
Fabian Grünbichler [Wed, 9 Mar 2022 08:55:36 +0000 (09:55 +0100)]
regex: bump to 1.5.5

to ensure CVE fix for DoS on untrusted RE is picked up where it matters

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agotools: parse_objset_stat: drop the unecessary 'objset-' from the log
Dominik Csapak [Mon, 7 Mar 2022 08:13:31 +0000 (09:13 +0100)]
tools: parse_objset_stat: drop the unecessary 'objset-' from the log

'objset_id' already contains that, so the error was
"could not parse 'objset-objset-0xFFFF' stat file"

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotools: zfs_dataset_stats: remove dataset <-> obset file mapping on error
Dominik Csapak [Mon, 7 Mar 2022 08:13:30 +0000 (09:13 +0100)]
tools: zfs_dataset_stats: remove dataset <-> obset file mapping on error

this can only real fail for two reasons:
* the format is wrong:
    this should not happen unless the format changed, then it will
    happen every time
* the file can't be read:
    this can happen if a user deletes and recreates a dataset manually,
    since the mapped file does not exist anymore but the dataset does

for the second case, delete the mapping from the hashmap, so that the
next call will refresh the mapping with the correct file

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi/config: use http_bail for 'not found' errors
Dominik Csapak [Fri, 4 Mar 2022 13:47:51 +0000 (14:47 +0100)]
api/config: use http_bail for 'not found' errors

the api should return a 404 error for entries that do not exist

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi/config: use param_bail for parameter errors
Dominik Csapak [Fri, 4 Mar 2022 13:47:50 +0000 (14:47 +0100)]
api/config: use param_bail for parameter errors

when using the 'extjs' formatter, it marks them in a way, so that
the gui can mark the form fields with the error

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoUsername schema: set min_length to 1
Dietmar Maurer [Mon, 7 Mar 2022 12:45:16 +0000 (13:45 +0100)]
Username schema: set min_length to 1

Just to get a better error message (the regex already requires min_length 1)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agocleanup: move BasicRealmInfo to pbs-api-types
Dietmar Maurer [Mon, 7 Mar 2022 06:41:03 +0000 (07:41 +0100)]
cleanup: move BasicRealmInfo to pbs-api-types

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agobump d/control
Wolfgang Bumiller [Fri, 4 Mar 2022 08:53:41 +0000 (09:53 +0100)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-schema dep to 1.3
Wolfgang Bumiller [Fri, 4 Mar 2022 08:50:21 +0000 (09:50 +0100)]
bump proxmox-schema dep to 1.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agopbs-config: improve semi-useful comment
Thomas Lamprecht [Tue, 1 Mar 2022 08:54:34 +0000 (09:54 +0100)]
pbs-config: improve semi-useful comment

commenting that version_cache.increase_datastore_generation increases
the, well, version is rather superfluous. Also avoid the use of "we",
which is always ambiguous in code comments.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopbs-datastore: use ConfigVersionCache for datastore
Dominik Csapak [Fri, 25 Feb 2022 14:26:11 +0000 (15:26 +0100)]
pbs-datastore: use ConfigVersionCache for datastore

instead of relying on the content of some configs

previously, we always read and parsed the config file, and only
generated a new config object when the path or the 'verify-new' option
changed.

now, we increase the datastore generation on config save, and if that
changed (or the last load is 1 minute in the past), we always
generate a new object

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agodocs: add tape schedule examples
Dominik Csapak [Mon, 28 Feb 2022 11:20:08 +0000 (12:20 +0100)]
docs: add tape schedule examples

just a few examples how one could configure tape pools and jobs.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agodocs: explain retention time for event allocation policy in more detail
Dominik Csapak [Mon, 28 Feb 2022 11:20:07 +0000 (12:20 +0100)]
docs: explain retention time for event allocation policy in more detail

'when the calendar event' triggers was too vague, it could mean for
the current media-set or the next time. Apart from that, it was not
technically correct all the time, since we take the start time of
the next media set if that exists first.

The idea here is that we begin the retention when the media set is
finished.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agodatastore: add tuning option for chunk order
Dominik Csapak [Tue, 22 Feb 2022 14:57:49 +0000 (15:57 +0100)]
datastore: add tuning option for chunk order

currently, we sort chunks by inode when verifying or backing up to tape.
we get the inode# by stat'ing each chunk, which may be more expensive
than the gains of reading the chunks in order

Since that is highly dependent on the underlying storage of the datastore,
introduce a tuning option  so that the admin can tune that behaviour
for each datastore.

The default stays the same (sorting by inode)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoclient cli: rustfmt
Thomas Lamprecht [Tue, 22 Feb 2022 10:03:13 +0000 (11:03 +0100)]
client cli: rustfmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobin: daily-update: use syslog/log crates instead of printing to stderr
Thomas Lamprecht [Tue, 22 Feb 2022 09:58:44 +0000 (10:58 +0100)]
bin: daily-update: use syslog/log crates instead of printing to stderr

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobin: daily-update: make single checks/updates fail gracefully
Thomas Lamprecht [Tue, 22 Feb 2022 09:26:59 +0000 (10:26 +0100)]
bin: daily-update: make single checks/updates fail gracefully

avoid that the acme renewal is skipped due to bailing out earlier
from a subscription or apt update error.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobin: daily-update: use from_millis instead of big nanosecond value
Thomas Lamprecht [Tue, 22 Feb 2022 09:25:40 +0000 (10:25 +0100)]
bin: daily-update: use from_millis instead of big nanosecond value

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobin: daily-update: rustfmt
Thomas Lamprecht [Mon, 21 Feb 2022 14:44:06 +0000 (15:44 +0100)]
bin: daily-update: rustfmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump d/control
Wolfgang Bumiller [Mon, 21 Feb 2022 13:24:52 +0000 (14:24 +0100)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-async dep to 0.4
Wolfgang Bumiller [Mon, 21 Feb 2022 13:25:29 +0000 (14:25 +0100)]
bump proxmox-async dep to 0.4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-lang dep to 1.1
Wolfgang Bumiller [Mon, 21 Feb 2022 13:24:24 +0000 (14:24 +0100)]
bump proxmox-lang dep to 1.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agouse io_format_err, io_bail, io_err_other from proxmox-lang
Dominik Csapak [Mon, 21 Feb 2022 10:39:18 +0000 (11:39 +0100)]
use io_format_err, io_bail, io_err_other from proxmox-lang

and move the comment from the local io_bail in pbs-client/src/pxar/fuse.rs
to the only use

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodepend on new 'proxmox-compression' crate
Dominik Csapak [Mon, 21 Feb 2022 10:39:17 +0000 (11:39 +0100)]
depend on new 'proxmox-compression' crate

the compression utilities live there now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocargo: bump schema dependency
Thomas Lamprecht [Fri, 18 Feb 2022 14:00:08 +0000 (15:00 +0100)]
cargo: bump schema dependency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocli client: backup: better use of our api macro capabilities
Thomas Lamprecht [Fri, 18 Feb 2022 14:01:09 +0000 (15:01 +0100)]
cli client: backup: better use of our api macro capabilities

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocli client: backup: refactor/cleanup of (dry-run) logs
Thomas Lamprecht [Fri, 18 Feb 2022 14:02:23 +0000 (15:02 +0100)]
cli client: backup: refactor/cleanup of (dry-run) logs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3323: cli client: add dry-run option for backup command
Markus Frank [Fri, 18 Feb 2022 09:55:38 +0000 (10:55 +0100)]
fix #3323: cli client: add dry-run option for backup command

adds a dry-run parameter for "proxmox-backup-client backup".
With this parameter on it simply prints out what would be uploaded,
instead of uploading it.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotape/pool_writer: skip already backed up chunks in iterator
Dominik Csapak [Thu, 17 Feb 2022 13:50:40 +0000 (14:50 +0100)]
tape/pool_writer: skip already backed up chunks in iterator

currently, the iterator goes over *all* chunks of the index, even
those already backed up by a previous snapshots in the same tape
backup. this is bad since for each iterator, we stat each chunk to
sort by inode number. so to avoid stat'ing the same chunks over
and over for consecutive snapshots, add a 'skip_fn' to the iterator
and in the pool writer and check the catalog_set if we can skip it

this means we can drop the later check for the catalog_set
(since we don't modify that here)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agorrd: extract data: avoid always calculating start-time fallback
Thomas Lamprecht [Tue, 15 Feb 2022 06:58:18 +0000 (07:58 +0100)]
rrd: extract data: avoid always calculating start-time fallback

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorrd: avoid intermediate index, directly loop over data
Thomas Lamprecht [Tue, 15 Feb 2022 06:55:08 +0000 (07:55 +0100)]
rrd: avoid intermediate index, directly loop over data

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorrd cache: code style, avoid useless intermediate mutable
Thomas Lamprecht [Tue, 15 Feb 2022 06:53:29 +0000 (07:53 +0100)]
rrd cache: code style, avoid useless intermediate mutable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomove src/shared_rate_limiter.rs to src/tools/shared_rate_limiter.rs
Dietmar Maurer [Mon, 14 Feb 2022 13:34:31 +0000 (14:34 +0100)]
move src/shared_rate_limiter.rs to src/tools/shared_rate_limiter.rs

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoParallelHandler: avoid re-export (cleanup)
Dietmar Maurer [Mon, 14 Feb 2022 13:12:39 +0000 (14:12 +0100)]
ParallelHandler: avoid re-export (cleanup)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agorename cached_traffic_control.rs to traffic_control_cache.rs, improve dev docs
Dietmar Maurer [Mon, 14 Feb 2022 12:44:27 +0000 (13:44 +0100)]
rename cached_traffic_control.rs to traffic_control_cache.rs, improve dev docs

Keep things inside crate::traffic_control_cache (do not pollute root namespace).

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agorrd_cache: add developer docs
Dietmar Maurer [Mon, 14 Feb 2022 11:03:58 +0000 (12:03 +0100)]
rrd_cache: add developer docs

and make RRD_CACHE private (please use get_rrd_cache instead).

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoui: fixup title case
Thomas Lamprecht [Mon, 14 Feb 2022 10:37:18 +0000 (11:37 +0100)]
ui: fixup title case

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: node options: add support for selecting default language
Matthias Heiserer [Thu, 10 Feb 2022 11:57:37 +0000 (12:57 +0100)]
ui: node options: add support for selecting default language

Allows setting the default language in Configuration/Other/General

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3853: tape cli: add force flag to key change-passphrase
Stefan Sterz [Thu, 10 Feb 2022 14:23:25 +0000 (15:23 +0100)]
fix #3853: tape cli: add force flag to key change-passphrase

Adds the '--force' flag to the proxmox-tape command allowing users
with root privileges to overwrite the passphrase of a given key.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2 years agofix #3853: api: add force option to tape key change-passphrase
Stefan Sterz [Thu, 10 Feb 2022 14:23:24 +0000 (15:23 +0100)]
fix #3853: api: add force option to tape key change-passphrase

When force is used, the current passphrase is not required. Instead
it will be read from the file pointed to by TAPE_KEYS_FILENAME and
the old key configuration will be overwritten using the new
passphrase. Requires super user privileges.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2 years agorest-server: bump schema to 1.2 and use convenience methods
Wolfgang Bumiller [Fri, 11 Feb 2022 13:09:45 +0000 (14:09 +0100)]
rest-server: bump schema to 1.2 and use convenience methods

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-rest-server: add missing 'derive' feature
Wolfgang Bumiller [Fri, 11 Feb 2022 12:57:48 +0000 (13:57 +0100)]
proxmox-rest-server: add missing 'derive' feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotools: disk: rustfmt
Thomas Lamprecht [Thu, 10 Feb 2022 16:46:13 +0000 (17:46 +0100)]
tools: disk: rustfmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: node/disk: rustfmt
Thomas Lamprecht [Thu, 10 Feb 2022 12:12:15 +0000 (13:12 +0100)]
api: node/disk: rustfmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomisc clippy fixes
Fabian Grünbichler [Tue, 8 Feb 2022 13:57:16 +0000 (14:57 +0100)]
misc clippy fixes

the trivial ones ;)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoreport: add tape, traffic control and disk infos
Aaron Lauterer [Mon, 7 Feb 2022 13:37:30 +0000 (14:37 +0100)]
report: add tape, traffic control and disk infos

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoreport: move subscription info further up
Aaron Lauterer [Mon, 7 Feb 2022 13:37:29 +0000 (14:37 +0100)]
report: move subscription info further up

This is something that is checked all the time. Having it further up
saves on scrolling and brings it into better alignment with PVE & PMG
regarding where in the report the info is located.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agonode config: add english to translation enum for default-lang
Matthias Heiserer [Mon, 7 Feb 2022 11:19:02 +0000 (12:19 +0100)]
node config: add english to translation enum for default-lang

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: node config: add default-lang integration
Matthias Heiserer [Mon, 7 Feb 2022 11:19:01 +0000 (12:19 +0100)]
api: node config: add default-lang integration

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: webauthn: decrease upgrade frequency from 1s to 2.5s
Thomas Lamprecht [Mon, 7 Feb 2022 14:20:08 +0000 (15:20 +0100)]
ui: webauthn: decrease upgrade frequency from 1s to 2.5s

this is nothing to important and nothing that'll get changed *that*
often, so 2.5s is more than enough.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: webauthn: fix stopping store upgrades on destroy
Thomas Lamprecht [Mon, 7 Feb 2022 14:17:00 +0000 (15:17 +0100)]
ui: webauthn: fix stopping store upgrades on destroy

`deactivate` is only triggered if we switch to a different tab on
the same navigation level, but if we switch to a completely different
component (e.g., fom `Options -> Others` to `Datastore foo`) we can
only work with the destroy event, use the before one as else we
cannot access the view controllers method anymore.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agore-use PROXMOX_DEBUG env variable to control log level filter
Dominik Csapak [Fri, 4 Feb 2022 09:12:20 +0000 (10:12 +0100)]
re-use PROXMOX_DEBUG env variable to control log level filter

So that we can make 'log::debug' messages actually appear in the
syslog.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3856 hint parameter is not optional
Markus Frank [Thu, 3 Feb 2022 11:57:26 +0000 (12:57 +0100)]
fix #3856 hint parameter is not optional

For the API the parameter --hint is not optional. This patch fixes
the man page and cli command doesn't send an API call, if the
parameter does not exist.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
2 years agoproxy: refactor gui-language logic
Thomas Lamprecht [Mon, 31 Jan 2022 14:58:44 +0000 (15:58 +0100)]
proxy: refactor gui-language logic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorest: add cookie_from_header helper
Thomas Lamprecht [Mon, 31 Jan 2022 14:50:23 +0000 (15:50 +0100)]
rest: add cookie_from_header helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxy: rustfmt
Thomas Lamprecht [Mon, 31 Jan 2022 13:21:47 +0000 (14:21 +0100)]
proxy: rustfmt

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