]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agofile-restore-daemon: disk: add RawFs bucket type
Stefan Reiter [Mon, 17 May 2021 12:31:37 +0000 (14:31 +0200)]
file-restore-daemon: disk: add RawFs bucket type

Used to specify a filesystem placed directly on a disk, without a
partition table inbetween. Detected by simply attempting to mount the
disk itself.

A helper "make_dev_node" is extracted to avoid code duplication.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore-daemon: disk: allow arbitrary component count per bucket
Stefan Reiter [Mon, 17 May 2021 12:31:36 +0000 (14:31 +0200)]
file-restore-daemon: disk: allow arbitrary component count per bucket

A bucket might contain multiple (or 0) layers of components in its path
specification, so allow a mapping between bucket type strings and
expected component depth. For partitions, this is 1, as there is only
the partition number layer below the "part" node.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore-daemon: disk: ignore "invalid fs" error
Stefan Reiter [Mon, 17 May 2021 12:31:35 +0000 (14:31 +0200)]
file-restore-daemon: disk: ignore "invalid fs" error

Mainly just causes log spam, we print a more useful error in the end if
all mounts fail anyway.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 1.1.8-1
Thomas Lamprecht [Fri, 21 May 2021 16:21:32 +0000 (18:21 +0200)]
bump version to 1.1.8-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocargo: bump proxmox-http version to 0.2.1
Thomas Lamprecht [Fri, 21 May 2021 16:25:26 +0000 (18:25 +0200)]
cargo: bump proxmox-http version to 0.2.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: config: move node ops (http-proxy) into existing "Authentication"
Thomas Lamprecht [Fri, 21 May 2021 16:19:51 +0000 (18:19 +0200)]
ui: config: move node ops (http-proxy) into existing "Authentication"

Mainly as Config -> Option is a weird name, Authentication has only
one obj. grid, the node options are only the http-proxy for now and
that is a sort of authentication, so good enough for me for now, but
should be rethought for 2.0 and/or once more node opts are added

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: bump versioned dependency for proxmox-widget-toolkit
Thomas Lamprecht [Fri, 21 May 2021 16:22:49 +0000 (18:22 +0200)]
d/control: bump versioned dependency for proxmox-widget-toolkit

for the new gridRows feature the ObjectGrid gained.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: rework node-config to static
Thomas Lamprecht [Fri, 21 May 2021 16:18:20 +0000 (18:18 +0200)]
ui: rework node-config to static

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: add node options under 'Configuration -> Options'
Dominik Csapak [Wed, 12 May 2021 14:42:32 +0000 (16:42 +0200)]
ui: add node options under 'Configuration -> Options'

for now only http-proxy lives there, but we will add more options later,
such as
* email from
* default gui language

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodocs: add short initial http-proxy docs
Thomas Lamprecht [Fri, 21 May 2021 16:17:17 +0000 (18:17 +0200)]
docs: add short initial http-proxy docs

better than nothing and something to point to in the UI

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: webauthn view: code cleanup
Thomas Lamprecht [Fri, 21 May 2021 16:19:11 +0000 (18:19 +0200)]
ui: webauthn view: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: hyphenate "Media-Set" to make it clearer that its one noun
Thomas Lamprecht [Fri, 21 May 2021 13:53:50 +0000 (15:53 +0200)]
ui: hyphenate "Media-Set" to make it clearer that its one noun

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape content: set icon-class for reload button
Thomas Lamprecht [Fri, 21 May 2021 13:51:54 +0000 (15:51 +0200)]
ui: tape content: set icon-class for reload button

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore: drop (now) unused references
Thomas Lamprecht [Fri, 21 May 2021 13:45:15 +0000 (15:45 +0200)]
ui: tape restore: drop (now) unused references

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore: avoid component/value lookup, use parameters
Thomas Lamprecht [Fri, 21 May 2021 13:44:16 +0000 (15:44 +0200)]
ui: tape restore: avoid component/value lookup, use parameters

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape: restore: cope with not fully instantiated components
Thomas Lamprecht [Fri, 21 May 2021 13:24:52 +0000 (15:24 +0200)]
tape: restore: cope with not fully instantiated components

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape: small code/style cleanups
Thomas Lamprecht [Fri, 21 May 2021 13:18:54 +0000 (15:18 +0200)]
ui: tape: small code/style cleanups

It was not actually bad, so they're quite opinionated to be honest,
but at least xtypes props must go first and variable declaration
should try to be as near as possible to the actual use as long as
code stays sensible readable/short.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore: update datastore map emptyText depending on default
Thomas Lamprecht [Fri, 21 May 2021 12:31:05 +0000 (14:31 +0200)]
ui: tape restore: update datastore map emptyText depending on default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: webauthn: drop bogus destroy stopStore call
Thomas Lamprecht [Fri, 21 May 2021 12:29:09 +0000 (14:29 +0200)]
ui: webauthn: drop bogus destroy stopStore call

will only result in an exception (in debug mode at least)...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape/BackupOverview: do not reload on restore
Dominik Csapak [Fri, 21 May 2021 10:20:22 +0000 (12:20 +0200)]
ui: tape/BackupOverview: do not reload on restore

a restore does not change the tape content, so a reload has no benefit here.
since we're touching those lines, change to 'autoShow' property

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: also allow to filter by group for restore
Dominik Csapak [Fri, 21 May 2021 10:20:21 +0000 (12:20 +0200)]
ui: tape/BackupOverview: also allow to filter by group for restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/window/TapeRestore: enabling selecting multiple snapshots
Dominik Csapak [Fri, 21 May 2021 10:20:20 +0000 (12:20 +0200)]
ui: tape/window/TapeRestore: enabling selecting multiple snapshots

by including the new snapshotselector. If a whole media-set is to be
restored, select all snapshots

to achieve this, we drop the 'restoreid' and 'datastores' properties
for the restore window, and replace them by a 'prefilter' object
(with 'store' and 'snapshot' properties)

to be able to show the snapshots, we now have to always load the
content of that media-set, so drop the short-circuit if we have
the datastores already.

change the layout of the restore window into a two-step window
so that the first tab is the selection what to restore, and on the
second tab the user chooses where to restore (drive, datastore, etc.)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/TapeRestore: improve SnapshotGrid
Dominik Csapak [Fri, 21 May 2021 10:20:19 +0000 (12:20 +0200)]
ui: tape/TapeRestore: improve SnapshotGrid

* handle not rendered call of getErrors
* return 'all' as value if all snaphots where selected
  (for better distinction)
* remove the default height
* add checkChange on stores filterChange
  (now change also fires on the gridfilter plugin change)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/TapeRestore: fix small DataStoreMappingGrid bugs
Dominik Csapak [Fri, 21 May 2021 10:20:18 +0000 (12:20 +0200)]
ui: tape/TapeRestore: fix small DataStoreMappingGrid bugs

enable scrolling by default, and handle the case that getErrors gets
called when the component is not yet rendered

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: dashboards statistics: visualize datastores where quering the usage failed
Thomas Lamprecht [Fri, 21 May 2021 11:21:46 +0000 (13:21 +0200)]
ui: dashboards statistics: visualize datastores where quering the usage failed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: status: graceful-degrade when a datastore lookup fails
Thomas Lamprecht [Fri, 21 May 2021 10:40:10 +0000 (12:40 +0200)]
api: status: graceful-degrade when a datastore lookup fails

This can happen if the underlying storage failed, in which case we do
not want to fail the whole API call, as it should report the status
of all datastores. So rather add the error inline to the related
store entry and continue.

Allows to nicely visualize those stores in the gui.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodashboard statistics: prepare a more graceful error handling in datastore-usage
Thomas Lamprecht [Fri, 21 May 2021 10:20:39 +0000 (12:20 +0200)]
dashboard statistics: prepare a more graceful error handling in datastore-usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: datastore status: refactor reused rrd get-data code into closure
Thomas Lamprecht [Fri, 21 May 2021 11:19:02 +0000 (13:19 +0200)]
api: datastore status: refactor reused rrd get-data code into closure

Nicer and shorter than just using a variable for the common parameters

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: datastore status: code cleanup, reduce indentation level
Thomas Lamprecht [Fri, 21 May 2021 08:29:14 +0000 (10:29 +0200)]
api: datastore status: code cleanup, reduce indentation level

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape/window/TapeRestore: add SnapshotGrid Component
Dominik Csapak [Fri, 14 May 2021 12:59:21 +0000 (14:59 +0200)]
ui: tape/window/TapeRestore: add SnapshotGrid Component

this will be used for letting the user select multiple, individual
snapshots on restore (instead of having a single or the whole media-set)

if a 'prefilter' object is given, we filter the grid by those
values using the gridfilter plugins (like in pve's bulk action windows)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: move restore buttons inline
Dominik Csapak [Fri, 14 May 2021 12:59:20 +0000 (14:59 +0200)]
ui: tape/BackupOverview: move restore buttons inline

instead of having them in the toolbar. This makes the UI more consistent
with the datastore content view.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: fix wrong media-set text for singlerestore
Dominik Csapak [Fri, 14 May 2021 12:59:19 +0000 (14:59 +0200)]
ui: tape/BackupOverview: fix wrong media-set text for singlerestore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobuildsys: split long debcargo invocation into multiple lines
Thomas Lamprecht [Tue, 18 May 2021 05:49:01 +0000 (07:49 +0200)]
buildsys: split long debcargo invocation into multiple lines

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump d/control
Wolfgang Bumiller [Mon, 17 May 2021 09:46:27 +0000 (11:46 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoupdate proxmox-http dependency
Wolfgang Bumiller [Mon, 17 May 2021 09:29:24 +0000 (11:29 +0200)]
update proxmox-http dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agod/control: update after http refactoring
Fabian Grünbichler [Mon, 17 May 2021 09:02:56 +0000 (11:02 +0200)]
d/control: update after http refactoring

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: datastore/Content: change group remove to SafeDestroy Window
Dominik Csapak [Mon, 17 May 2021 07:03:15 +0000 (09:03 +0200)]
ui: datastore/Content: change group remove to SafeDestroy Window

so that a user does not accidentally remove a whole group instead
of a snapshot

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: datastore/Content: fix wrong tooltip for forgetting
Dominik Csapak [Mon, 17 May 2021 07:03:14 +0000 (09:03 +0200)]
ui: datastore/Content: fix wrong tooltip for forgetting

sometimes it's a group, not a snapshot

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agomove SimpleHttp to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:57 +0000 (15:44 +0200)]
move SimpleHttp to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoSimpleHttp: factor out product-specific bits
Fabian Grünbichler [Fri, 14 May 2021 13:44:56 +0000 (15:44 +0200)]
SimpleHttp: factor out product-specific bits

in preparation of moving the abstraction to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove tools::http to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:55 +0000 (15:44 +0200)]
move tools::http to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove ProxyConfig to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:54 +0000 (15:44 +0200)]
move ProxyConfig to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoHttpsConnector: make keepalive configurable
Fabian Grünbichler [Fri, 14 May 2021 13:44:53 +0000 (15:44 +0200)]
HttpsConnector: make keepalive configurable

it's the only PBS-specific part in there, so let's make it
product-agnostic before moving it off to proxmox-http.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove MaybeTlsStream wrapper to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:52 +0000 (15:44 +0200)]
move MaybeTlsStream wrapper to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agorefactor: move socket helper to proxmox crate
Fabian Grünbichler [Fri, 14 May 2021 13:44:51 +0000 (15:44 +0200)]
refactor: move socket helper to proxmox crate

and constant to tools module.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove websocket to new 'proxmox_http' crate
Fabian Grünbichler [Fri, 14 May 2021 13:44:50 +0000 (15:44 +0200)]
move websocket to new 'proxmox_http' crate

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: datastore/Content: add forget button for groups
Dominik Csapak [Fri, 14 May 2021 14:36:03 +0000 (16:36 +0200)]
ui: datastore/Content: add forget button for groups

since we can remove whole groups via api now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/admin/datastore: add delete for groups
Dominik Csapak [Fri, 14 May 2021 14:36:02 +0000 (16:36 +0200)]
api2/admin/datastore: add delete for groups

so that a user can delete a whole group at once, until now, the fastest
way for this was to prune to one snapshot, and delete that

code is basically a copy/paste from the snapshot delete, sans
the 'backup-time' parameter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agod/control: update proxmox tools dependency
Thomas Lamprecht [Fri, 14 May 2021 11:19:05 +0000 (13:19 +0200)]
d/control: update proxmox tools dependency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape/test: repair tests after changing 'start_write_session'
Dominik Csapak [Fri, 14 May 2021 07:28:50 +0000 (09:28 +0200)]
tape/test: repair tests after changing 'start_write_session'

i added a parameter and forgot to adapt the tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: add 'Force new Media Set' checkbox to manual backup
Dominik Csapak [Mon, 10 May 2021 14:45:54 +0000 (16:45 +0200)]
ui: tape: add 'Force new Media Set' checkbox to manual backup

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/tape/backup: add 'force-media-set' parameter to manual backup
Dominik Csapak [Mon, 10 May 2021 14:45:53 +0000 (16:45 +0200)]
api2/tape/backup: add 'force-media-set' parameter to manual backup

so that a user can force a new media set, e.g. if he uses the
allocation policy 'continue', but wants to manually start a new
media-set.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: ChangerStatus fixup for empty barcode
Dominik Csapak [Fri, 30 Apr 2021 09:46:42 +0000 (11:46 +0200)]
ui: tape: ChangerStatus fixup for empty barcode

empty barcode means that label-text is '', not undefined
we forgot this line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: TapeRestoreWindow: fix button text
Dominik Csapak [Wed, 12 May 2021 12:08:12 +0000 (14:08 +0200)]
ui: tape: TapeRestoreWindow: fix button text

s/Create/Restore/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoacme: improve errors when account loading fails
Wolfgang Bumiller [Wed, 12 May 2021 10:06:18 +0000 (12:06 +0200)]
acme: improve errors when account loading fails

if the account does not exist, error with its name
if file loading fails, the error includes the full path
if the content fails to parse, show file & parse error
and in each case mention that it's about loading the acme account file

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocorrectly set apt proxy configuration
Dietmar Maurer [Mon, 10 May 2021 11:07:46 +0000 (13:07 +0200)]
correctly set apt proxy configuration

3 years agoreload cert inside command socket handler
Dietmar Maurer [Wed, 12 May 2021 09:53:49 +0000 (11:53 +0200)]
reload cert inside command socket handler

3 years agoui: add task descriptions for ACME related tasks
Thomas Lamprecht [Tue, 11 May 2021 16:08:10 +0000 (18:08 +0200)]
ui: add task descriptions for ACME related tasks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: acme accounts: use name as worker ID
Thomas Lamprecht [Tue, 11 May 2021 16:07:03 +0000 (18:07 +0200)]
api: acme accounts: use name as worker ID

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoconfig: acme: rust format
Thomas Lamprecht [Tue, 11 May 2021 15:35:54 +0000 (17:35 +0200)]
config: acme: rust format

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoconfig: acme: fall-back to the "default" account
Thomas Lamprecht [Tue, 11 May 2021 15:33:06 +0000 (17:33 +0200)]
config: acme: fall-back to the "default" account

syncs behavior with both, the displayed state in the PBS
web-interface, and the behavior of PVE/PMG.

Without this a standard setup would result in a Error like:
> TASK ERROR: no acme client configured

which was pretty confusing, as the actual error was something else
(no account configured), and the web-interface showed "default" as
selected account, so a user had no idea what actually was wrong and
how to fix it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agohot-reload proxy certificate when updating via the API
Wolfgang Bumiller [Tue, 11 May 2021 13:54:00 +0000 (15:54 +0200)]
hot-reload proxy certificate when updating via the API

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agorefactor send_command
Wolfgang Bumiller [Tue, 11 May 2021 13:53:59 +0000 (15:53 +0200)]
refactor send_command

- refactor the combinators,
- make it take a `&T: Serialize` instead of a Value, and
  allow sending the raw string via `send_raw_command`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxy: implement 'reload-certificate' command
Wolfgang Bumiller [Tue, 11 May 2021 13:53:58 +0000 (15:53 +0200)]
proxy: implement 'reload-certificate' command

to be used via the command socket

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxy: factor out tls acceptor creation
Wolfgang Bumiller [Tue, 11 May 2021 13:53:57 +0000 (15:53 +0200)]
proxy: factor out tls acceptor creation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxy: Arc usage cleanup
Wolfgang Bumiller [Tue, 11 May 2021 13:53:56 +0000 (15:53 +0200)]
proxy: Arc usage cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxy: "continue on error" for the accept call, too
Wolfgang Bumiller [Tue, 11 May 2021 13:53:55 +0000 (15:53 +0200)]
proxy: "continue on error" for the accept call, too

as this gets rid of 2 levels of indentation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxy: factor out accept_connection
Wolfgang Bumiller [Tue, 11 May 2021 13:53:54 +0000 (15:53 +0200)]
proxy: factor out accept_connection

no functional changes, moved code and named the channel's
type for more readability

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 1.1.7-1
Dietmar Maurer [Tue, 11 May 2021 11:23:29 +0000 (13:23 +0200)]
bump version to 1.1.7-1

3 years agoclient: use stderr for all fingerprint confirm msgs
Fabian Grünbichler [Mon, 10 May 2021 08:52:34 +0000 (10:52 +0200)]
client: use stderr for all fingerprint confirm msgs

an interactive client might still want machine-readable output on
stdout.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclient: refactor verification callback
Fabian Grünbichler [Mon, 10 May 2021 08:52:33 +0000 (10:52 +0200)]
client: refactor verification callback

return a result with optional fingerprint instead of tuple, allowing
easy extraction of a meaningful error message.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclient: improve fingerprint variable names
Fabian Grünbichler [Mon, 10 May 2021 08:52:32 +0000 (10:52 +0200)]
client: improve fingerprint variable names

and pass as reference instead of cloning.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agofix #3391: improve mismatched fingerprint handling
Fabian Grünbichler [Mon, 10 May 2021 08:52:31 +0000 (10:52 +0200)]
fix #3391: improve mismatched fingerprint handling

if the expected fingerprint and the one returned by the server don't
match, print a warning and allow confirmation and proceeding if running
interactive.

previous:

$ proxmox-backup-client ...
Error: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1915:

new:

$ proxmox-backup-client ...
WARNING: certificate fingerprint does not match expected fingerprint!
expected:    ac:cb:6a:bc:d6:b7:b4:77:3e:17:05:d6:b6:29:dd:1f:05:9c:2b:3a:df:84:3b:4d:f9:06:2c:be:da:06:52:12
fingerprint: ab:cb:6a:bc:d6:b7:b4:77:3e:17:05:d6:b6:29:dd:1f:05:9c:2b:3a:df:84:3b:4d:f9:06:2c:be:da:06:52:12
Are you sure you want to continue connecting? (y/n): n
Error: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1915:

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: tape: add single snapshot restore
Dominik Csapak [Tue, 11 May 2021 10:50:07 +0000 (12:50 +0200)]
ui: tape: add single snapshot restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobin/proxmox-tape: add optional snapshots to restore command
Dominik Csapak [Tue, 11 May 2021 10:50:06 +0000 (12:50 +0200)]
bin/proxmox-tape: add optional snapshots to restore command

and add the appropriate completion helper

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape/inventory: add completion helper for tape snapshots
Dominik Csapak [Tue, 11 May 2021 10:50:05 +0000 (12:50 +0200)]
tape/inventory: add completion helper for tape snapshots

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/tape/restore: add optional snapshots to 'restore'
Dominik Csapak [Tue, 11 May 2021 10:50:04 +0000 (12:50 +0200)]
api2/tape/restore: add optional snapshots to 'restore'

this makes it possible to only restore some snapshots from a tape media-set
instead of the whole. If the user selects only a small part, this will
probably be faster (and definitely uses less space on the target
datastores).

the user has to provide a list of snapshots to restore in the form of
'store:type/group/id'
e.g. 'mystore:ct/100/2021-01-01T00:00:00Z'

we achieve this by first restoring the index to a temp dir, retrieving
a list of chunks, and using the catalog, we generate a list of
media/files that we need to (partially) restore.

finally, we copy the snapshots to the correct dir in the datastore,
and clean up the temp dir

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/tape/restore: refactor restore code into its own function
Dominik Csapak [Tue, 11 May 2021 10:50:03 +0000 (12:50 +0200)]
api2/tape/restore: refactor restore code into its own function

and create the 'email' and 'restore_owner' variable at the beginning,
so that we can reuse them and do not have to pass the sources of those
through too many functions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape locate_file: fix off by one error
Dietmar Maurer [Tue, 11 May 2021 10:37:04 +0000 (12:37 +0200)]
tape locate_file: fix off by one error

3 years agodocs/api-viewer: improve rendering of array format
Dominik Csapak [Mon, 10 May 2021 09:28:00 +0000 (11:28 +0200)]
docs/api-viewer: improve rendering of array format

by showing
'[format, ...]'
where 'format' is the simple format from the type of the items

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape/pool_writer: do not unwrap on channel send
Dominik Csapak [Mon, 10 May 2021 11:54:09 +0000 (13:54 +0200)]
tape/pool_writer: do not unwrap on channel send

if the reader thread is already gone here, we panic here, resulting in
a nondescript error message, so simply ignore/warn in that case and
return gracefully

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: window/SyncJobEdit: disable autoSelect for remote datastore
Dominik Csapak [Mon, 10 May 2021 11:22:40 +0000 (13:22 +0200)]
ui: window/SyncJobEdit: disable autoSelect for remote datastore

when changin the remote, there is a high chance that there are different
datastores, and if a user does not pay attention, now the first store
of the new remote is selected, instead of the one with the same name

disable autoSelect and let the user manually select a remote datastore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: rename 'Datastore' to 'Target Datastore'
Dominik Csapak [Mon, 10 May 2021 11:19:46 +0000 (13:19 +0200)]
ui: tape: rename 'Datastore' to 'Target Datastore'

we have 2 modi in that window:
* backup has multiple datastores
* backup has single datastore

In the first case we show a 'mapping' grid so that
the user can only restore a part. Here a user sees all source
Datastores and can select a target for each one.

In the second case we only have a single 'Datastore' selector, but
we do not show the source. Because of this, the naming is slightly ambiguous
(is it the 'Source' or the 'Target' ?), so rename it to 'Target Datastore'.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agomanager: acme plugin: auto-complete available DNS challenge types
Thomas Lamprecht [Mon, 10 May 2021 13:55:49 +0000 (15:55 +0200)]
manager: acme plugin: auto-complete available DNS challenge types

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocompletion: ACME plugin type: comment out http type for now, not useful
Thomas Lamprecht [Mon, 10 May 2021 13:50:06 +0000 (15:50 +0200)]
completion: ACME plugin type: comment out http type for now, not useful

It may make sense in the future, e.g., if the built-in standalone
type is not enough, e.g., as HTTP**s**, HTTP 2 or even QUIC (HTTP 3)
is wanted in some setups, but for now there's no scenario where one
would profit from adding a new HTTP plugin, especially as it requires
the `data` property to be set, which makes no sense..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agomanager: acme plugin: remove ID completion helper from add command
Thomas Lamprecht [Mon, 10 May 2021 13:47:36 +0000 (15:47 +0200)]
manager: acme plugin: remove ID completion helper from add command

we cannot add a plugin with an existing ID so this completion helper
is rather counterproductive...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoconfig: acme: drop now unused foreach_dns_plugin
Thomas Lamprecht [Mon, 10 May 2021 12:41:44 +0000 (14:41 +0200)]
config: acme: drop now unused foreach_dns_plugin

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoacme: use proxmox-acme-plugins and load schema from there
Thomas Lamprecht [Mon, 10 May 2021 12:41:12 +0000 (14:41 +0200)]
acme: use proxmox-acme-plugins and load schema from there

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: move AcmeChallengeSchema to acme types module
Thomas Lamprecht [Mon, 10 May 2021 12:39:05 +0000 (14:39 +0200)]
api: move AcmeChallengeSchema to acme types module

It will be reused in a later patch in another module which should not
depend on the actual API implementation (ugly and cyclic)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: acme: rustfmt
Thomas Lamprecht [Mon, 10 May 2021 09:50:18 +0000 (11:50 +0200)]
api: acme: rustfmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoacme: fix bad nonce retry counter
Wolfgang Bumiller [Mon, 10 May 2021 09:52:04 +0000 (11:52 +0200)]
acme: fix bad nonce retry counter

Actually return the error on the 3rd try.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix #3296: use proxy client to retrieve changelog
Dylan Whyte [Fri, 7 May 2021 10:53:03 +0000 (12:53 +0200)]
fix #3296: use proxy client to retrieve changelog

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agofix #3296: use proxy for subscriptions
Dylan Whyte [Fri, 7 May 2021 10:53:02 +0000 (12:53 +0200)]
fix #3296: use proxy for subscriptions

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agofix 3296: add http_proxy to node config, and provide a cli
Dylan Whyte [Fri, 7 May 2021 10:53:00 +0000 (12:53 +0200)]
fix 3296: add http_proxy to node config, and provide a cli

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
3 years agocleanup src/api2/node/config.rs
Dietmar Maurer [Mon, 10 May 2021 06:19:28 +0000 (08:19 +0200)]
cleanup src/api2/node/config.rs

- add return type
- fix permissions
- fix descriptions

3 years agomove api related type/regx definition from backup_info.rs to src/api2/types/mod.rs
Dietmar Maurer [Fri, 7 May 2021 10:45:44 +0000 (12:45 +0200)]
move api related type/regx definition from backup_info.rs to src/api2/types/mod.rs

3 years agoapi2/types: add TAPE_RESTORE_SNAPSHOT_SCHEMA
Dominik Csapak [Thu, 6 May 2021 12:20:03 +0000 (14:20 +0200)]
api2/types: add TAPE_RESTORE_SNAPSHOT_SCHEMA

which is 'store:type/id/time'

needed to refactor SNAPSHOT_PATH_REGEX_STR from backup_info

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/tape/restore: return backup manifest in try_restore_snapshot_archive
Dominik Csapak [Thu, 6 May 2021 12:20:02 +0000 (14:20 +0200)]
api2/tape/restore: return backup manifest in try_restore_snapshot_archive

we'll use that for partial snapshot restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoprogress: shorter format
Fabian Grünbichler [Fri, 7 May 2021 08:03:10 +0000 (10:03 +0200)]
progress: shorter format

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoprogress: add current group to output
Fabian Grünbichler [Fri, 7 May 2021 08:03:09 +0000 (10:03 +0200)]
progress: add current group to output

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