]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agotape/media_catalog: add helpers to look for snapshot/chunk files
Dominik Csapak [Wed, 5 May 2021 10:09:12 +0000 (12:09 +0200)]
tape/media_catalog: add helpers to look for snapshot/chunk files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape/drive: add 'move_to_file' to TapeDriver trait
Dominik Csapak [Wed, 5 May 2021 10:09:11 +0000 (12:09 +0200)]
tape/drive: add 'move_to_file' to TapeDriver trait

so that we can directly move to a specified file on the tape

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agohttp proxy: add necessary brackets for IPv6 proxy
Dietmar Maurer [Wed, 5 May 2021 09:57:04 +0000 (11:57 +0200)]
http proxy: add necessary brackets for IPv6 proxy

3 years agoproxmox_restore_daemon: mount ntfs with 'utf8' option
Dominik Csapak [Wed, 5 May 2021 08:46:19 +0000 (10:46 +0200)]
proxmox_restore_daemon: mount ntfs with 'utf8' option

otherwise, the kernel driver exposes file names as iso 8859-1,
but we want to have them as utf8.

This mapping should always work, since UTF16 can be cleanly converted
to UTF8.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoclient/http_client: add necessary brackets
Dietmar Maurer [Wed, 5 May 2021 08:29:15 +0000 (10:29 +0200)]
client/http_client: add necessary brackets

if we are given a 'naked' ipv6 without square brackets around it,
we need to add them ourselves, since the address is ambigious otherwise
when we add the port.

e.g. giving 'fe80::1' as address we arrive at the url (with the default port)
'https://fe80::1:8007/'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
3 years agouse api_string_type macro
Wolfgang Bumiller [Tue, 4 May 2021 10:19:30 +0000 (12:19 +0200)]
use api_string_type macro

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
3 years agodocs: tape: clarify LTO-4/5 support
Dominik Csapak [Mon, 3 May 2021 09:27:46 +0000 (11:27 +0200)]
docs: tape: clarify LTO-4/5 support

some features we need (e.g. READ POSITION long form) are only officially
available with LTO-5, but work on many LTO-4 drives, so move LTO-4 to
'best-effort' support.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape/restore: optimize chunk restore behaviour
Dominik Csapak [Tue, 4 May 2021 10:21:47 +0000 (12:21 +0200)]
tape/restore: optimize chunk restore behaviour

by checking the 'checked_chunks' before trying to write to disk
and by doing the existance check in the parallel handler. This way,
we do not have to check the existance of a chunk multiple times
(if multiple source datastores gets restored to the same target
datastore) and also we do not have to wait on the stat before reading
the next chunk.

We have to change the &WorkerTask to an Arc though, otherwise we
cannot log to the worker from the parallel handler

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump version to 1.1.6-2
Dietmar Maurer [Tue, 4 May 2021 10:25:16 +0000 (12:25 +0200)]
bump version to 1.1.6-2

3 years agoupdate debian/control
Dietmar Maurer [Tue, 4 May 2021 10:23:24 +0000 (12:23 +0200)]
update debian/control

3 years agoRevert "temporarily disable broken test"
Wolfgang Bumiller [Tue, 4 May 2021 10:09:51 +0000 (12:09 +0200)]
Revert "temporarily disable broken test"

This reverts commit 888d89e2ddd340413f65c155170f844f78b3649f.

The code this depends on should now be available.

3 years agofix permissions set in create_run_dir
Wolfgang Bumiller [Tue, 4 May 2021 07:45:27 +0000 (09:45 +0200)]
fix permissions set in create_run_dir

This directory needs to be owned by the backup user instead
of root.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 1.1.6-1
Dietmar Maurer [Tue, 4 May 2021 10:09:56 +0000 (12:09 +0200)]
bump version to 1.1.6-1

3 years agomove basic ACME types into src/api2/types/acme.rs
Dietmar Maurer [Tue, 4 May 2021 09:29:27 +0000 (11:29 +0200)]
move basic ACME types into src/api2/types/acme.rs

And rename AccountName into AcmeAccountName.

3 years agotape restore: do not verify restored files
Dietmar Maurer [Mon, 3 May 2021 10:42:49 +0000 (12:42 +0200)]
tape restore: do not verify restored files

Because this is too slow and causes the tape motor to stop. Instead,
remove the verify_state from the manifest.

3 years agotape restore: add restore speed to logs
Dietmar Maurer [Fri, 30 Apr 2021 11:04:55 +0000 (13:04 +0200)]
tape restore: add restore speed to logs

3 years agotape restore: write datastore in separate thread
Dietmar Maurer [Fri, 30 Apr 2021 10:35:11 +0000 (12:35 +0200)]
tape restore: write datastore in separate thread

3 years agotape restore: split restore_chunk_archive
Dietmar Maurer [Fri, 30 Apr 2021 10:09:50 +0000 (12:09 +0200)]
tape restore: split restore_chunk_archive

Split out a separate function scan_chunk_archive() for catalog restores.

Note: Required, because we need to optimize restore_chunk_archive() to
write datastore in separate threads (else thape drive will stop during restore)

3 years agodaily-update: check acme certificates
Wolfgang Bumiller [Mon, 3 May 2021 09:39:59 +0000 (11:39 +0200)]
daily-update: check acme certificates

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoui: add certificate & acme view
Wolfgang Bumiller [Mon, 3 May 2021 09:39:58 +0000 (11:39 +0200)]
ui: add certificate & acme view

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd acme commands to proxmox-backup-manager
Wolfgang Bumiller [Mon, 3 May 2021 09:39:57 +0000 (11:39 +0200)]
add acme commands to proxmox-backup-manager

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd node/{node}/config api path
Wolfgang Bumiller [Mon, 3 May 2021 09:39:56 +0000 (11:39 +0200)]
add node/{node}/config api path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd node/{node}/certificates api call
Wolfgang Bumiller [Mon, 3 May 2021 09:39:55 +0000 (11:39 +0200)]
add node/{node}/certificates api call

API like in PVE:

GET    .../info             => current cert information
POST   .../custom           => upload custom certificate
DELETE .../custom           => delete custom certificate
POST   .../acme/certificate => order acme certificate
PUT    .../acme/certificate => renew expiring acme cert

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd config/acme api path
Wolfgang Bumiller [Mon, 3 May 2021 09:39:54 +0000 (11:39 +0200)]
add config/acme api path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agonode config cleanups
Dietmar Maurer [Tue, 4 May 2021 07:15:57 +0000 (09:15 +0200)]
node config cleanups

3 years agoadd node config
Wolfgang Bumiller [Mon, 3 May 2021 09:39:53 +0000 (11:39 +0200)]
add node config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocleanup acme client
Dietmar Maurer [Tue, 4 May 2021 07:28:53 +0000 (09:28 +0200)]
cleanup acme client

3 years agoadd acme client
Wolfgang Bumiller [Mon, 3 May 2021 09:39:52 +0000 (11:39 +0200)]
add acme client

This is the highlevel part using proxmox-acme-rs to create
requests and our hyper code to issue them to the acme
server.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd acme config
Wolfgang Bumiller [Mon, 3 May 2021 09:39:51 +0000 (11:39 +0200)]
add acme config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodocs: user-management: add note about untrusted certificates for webauthn
Dominik Csapak [Mon, 3 May 2021 09:33:40 +0000 (11:33 +0200)]
docs: user-management: add note about untrusted certificates for webauthn

Since currently it works fine with untrusted certs, but that may change
anytime.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape backup job: fix typo in error message
Thomas Lamprecht [Sat, 1 May 2021 10:01:09 +0000 (12:01 +0200)]
tape backup job: fix typo in error message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobin: use extract_output_format where necessary
Dominik Csapak [Fri, 30 Apr 2021 12:51:56 +0000 (14:51 +0200)]
bin: use extract_output_format where necessary

else we sometimes forget to remove it from the 'params' variable
and use that further, running into 'invalid parameter' errors

found by giving 'output-format' paramter to proxmox-tape status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd ctime and size function to IndexFile trait
Hannes Laimer [Thu, 29 Apr 2021 11:00:14 +0000 (13:00 +0200)]
add ctime and size function to IndexFile trait

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
3 years agoui: tape: handle tapes in changers without barcode
Dominik Csapak [Fri, 30 Apr 2021 08:13:13 +0000 (10:13 +0200)]
ui: tape: handle tapes in changers without barcode

by checking for definedness of the label (tapes without barcode
have the empty string as label-text) and falling back to the
source slot for the load action

Note: Changed the load-slot API from PUT to POST

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
3 years agoadd dns alias schema
Wolfgang Bumiller [Thu, 29 Apr 2021 13:13:09 +0000 (15:13 +0200)]
add dns alias schema

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotemporarily disable broken test
Thomas Lamprecht [Thu, 29 Apr 2021 14:18:18 +0000 (16:18 +0200)]
temporarily disable broken test

this test was added before the used NodeConfig schema was committed,
cannot work...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 1.1.5-3
Thomas Lamprecht [Thu, 29 Apr 2021 13:26:24 +0000 (15:26 +0200)]
bump version to 1.1.5-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofile restore: log which filesystems we support
Thomas Lamprecht [Thu, 29 Apr 2021 13:24:45 +0000 (15:24 +0200)]
file restore: log which filesystems we support

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofile-restore: use 'norecovery' for xfs filesystem
Stefan Reiter [Thu, 29 Apr 2021 08:22:53 +0000 (10:22 +0200)]
file-restore: use 'norecovery' for xfs filesystem

This allows mounting XFS partitons with 'dirty' states, like from a
running VM. Otherwise XFS tries to write recovery information, which
fails on a read-only mount.

Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoadd 'config file format' to tools::config
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:58 +0000 (16:01 +0200)]
add 'config file format' to tools::config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoconfig::acl: make /system/certificates a valid path
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:57 +0000 (16:01 +0200)]
config::acl: make /system/certificates a valid path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump d/control
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:56 +0000 (16:01 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoCargo.toml: depend on proxmox-acme-rs
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:55 +0000 (16:01 +0200)]
Cargo.toml: depend on proxmox-acme-rs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocatalog shell: replace LoopState with ControlFlow
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:54 +0000 (16:01 +0200)]
catalog shell: replace LoopState with ControlFlow

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools: add ControlFlow type
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:53 +0000 (16:01 +0200)]
tools: add ControlFlow type

modeled after std::ops::ControlFlow

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoCertInfo: add is_expired_after_epoch
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:52 +0000 (16:01 +0200)]
CertInfo: add is_expired_after_epoch

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoCertInfo: add not_{after, before}_unix
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:51 +0000 (16:01 +0200)]
CertInfo: add not_{after, before}_unix

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoconfig: factor out certificate writing
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:50 +0000 (16:01 +0200)]
config: factor out certificate writing

for reuse in the certificate api

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools::fs::scan_subdir: use nix::Error instead of anyhow
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:49 +0000 (16:01 +0200)]
tools::fs::scan_subdir: use nix::Error instead of anyhow

allows using SysError trait on it

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosystemd: add reload_unit
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:47 +0000 (16:01 +0200)]
systemd: add reload_unit

via try-reload-or-restart

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools/http: make user agent configurable
Dietmar Maurer [Wed, 28 Apr 2021 10:00:21 +0000 (12:00 +0200)]
tools/http: make user agent configurable

3 years agotools/http: set USER_AGENT inside request
Dietmar Maurer [Wed, 28 Apr 2021 09:44:51 +0000 (11:44 +0200)]
tools/http: set USER_AGENT inside request

3 years agobump version to 1.1.5-2
Thomas Lamprecht [Wed, 28 Apr 2021 09:15:43 +0000 (11:15 +0200)]
bump version to 1.1.5-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: add schema for http proxy configuration - HTTP_PROXY_SCHEMA
Dietmar Maurer [Wed, 28 Apr 2021 08:59:35 +0000 (10:59 +0200)]
api: add schema for http proxy configuration - HTTP_PROXY_SCHEMA

3 years agohttp: add helper to parse proxy configuration
Dietmar Maurer [Wed, 28 Apr 2021 08:08:45 +0000 (10:08 +0200)]
http: add helper to parse proxy configuration

3 years agoHttpsConnector: add proxy authorization support
Dietmar Maurer [Wed, 28 Apr 2021 07:55:17 +0000 (09:55 +0200)]
HttpsConnector: add proxy authorization support

3 years agobuildsys: add pbs-client repo in upload target
Thomas Lamprecht [Wed, 28 Apr 2021 07:41:45 +0000 (09:41 +0200)]
buildsys: add pbs-client repo in upload target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofile-restore: strip .img.fidx suffix from drive serials
Stefan Reiter [Tue, 27 Apr 2021 13:35:45 +0000 (15:35 +0200)]
file-restore: strip .img.fidx suffix from drive serials

Drive serials have a character limit of 20, longer names like
"drive-virtio0.img.fidx" or "drive-efidisk0.img.fidx" would get cut off.

Fix this by removing the suffix, it is not necessary to uniquely
identify an image.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 1.1.5-1
Dietmar Maurer [Tue, 27 Apr 2021 10:21:08 +0000 (12:21 +0200)]
bump version to 1.1.5-1

3 years agotools/sgutils2: add size workaround for mode_sense
Dominik Csapak [Tue, 27 Apr 2021 08:17:01 +0000 (10:17 +0200)]
tools/sgutils2: add size workaround for mode_sense

Some drives will always return the number of bytes given in the
allocation_length field, but correctly report the data len in the mode
sense header. Simply ignore the excess data.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape: improve inline docs
Dietmar Maurer [Tue, 27 Apr 2021 09:17:45 +0000 (11:17 +0200)]
tape: improve inline docs

3 years agotape: add read_medium_configuration_page() to detect WORM media
Dietmar Maurer [Tue, 27 Apr 2021 09:00:59 +0000 (11:00 +0200)]
tape: add read_medium_configuration_page() to detect WORM media

And use it inside format_media().

3 years agofile-restore: fix package name for kernel/initramfs image
Stefan Reiter [Tue, 27 Apr 2021 08:48:16 +0000 (10:48 +0200)]
file-restore: fix package name for kernel/initramfs image

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agotape: remove MediumType struct, which is only valid on IBM drives
Dietmar Maurer [Tue, 27 Apr 2021 07:32:07 +0000 (09:32 +0200)]
tape: remove MediumType struct, which is only valid on IBM drives

HP drives do not return this information.

Note: This breaks format on WORM media, because we have not way
to detect WOREM media (how?).

3 years agobump version to 1.1.4-1
Thomas Lamprecht [Tue, 27 Apr 2021 06:41:05 +0000 (08:41 +0200)]
bump version to 1.1.4-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotools/sgutils2: improve error messages
Dominik Csapak [Mon, 26 Apr 2021 13:20:25 +0000 (15:20 +0200)]
tools/sgutils2: improve error messages

include the expected and unexpected sizes in the error message,
so that it's easier to debug in case of an error

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofile-restore: use less memory for VM and reboot on panic
Stefan Reiter [Mon, 26 Apr 2021 13:04:16 +0000 (15:04 +0200)]
file-restore: use less memory for VM and reboot on panic

With the vsock-pkt-buffer fix in proxmox-backup-restore-image, we can
use way less memory for the VM without risking any crashes. 128 MiB
seems to be the lowest it will go and still be fully reliable.

While at it, add the "panic=1" argument to the kernel command line, so
in case the kernel *does* run out of memory, it will at least restart
automatically.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore: exit with code 1 in case streaming fails
Stefan Reiter [Mon, 26 Apr 2021 13:04:15 +0000 (15:04 +0200)]
file-restore: exit with code 1 in case streaming fails

This way the task gets marked as "failed" in PVE.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore: add size to image files and components
Stefan Reiter [Mon, 26 Apr 2021 13:04:14 +0000 (15:04 +0200)]
file-restore: add size to image files and components

Read image sizes (.pxar.fidx/.img.didx) from manifest and partition
sizes from /sys/...

Requires a change to ArchiveEntry, as DirEntryAttribute::Directory
does not have a size associated with it (and that's probably good).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agohttp proxy: improve response parser
Dietmar Maurer [Mon, 26 Apr 2021 09:21:11 +0000 (11:21 +0200)]
http proxy: improve response parser

Avoid strange error message in case of connect error (only parse status + headers).
We are not interested in the response body, so simply ignore it.

3 years agoapi2/config/datastore: use update_job_last_run_time for schedules
Dominik Csapak [Mon, 26 Apr 2021 08:21:06 +0000 (10:21 +0200)]
api2/config/datastore: use update_job_last_run_time for schedules

this way, the api call does not error out when the file is locked
currently (which means that job is running and we do not need
to update the time)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoserver/jobstate: improve name of 'try_update_state_file'
Dominik Csapak [Mon, 26 Apr 2021 08:21:05 +0000 (10:21 +0200)]
server/jobstate: improve name of 'try_update_state_file'

and improve comment

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoserver/jobstate: add 'updatd' to Finish variant
Dominik Csapak [Mon, 19 Apr 2021 08:32:16 +0000 (10:32 +0200)]
server/jobstate: add 'updatd' to Finish variant

when a user updates a job schedule, we want to save that point in time
to calculate future runs, otherwise when a user updates a schedule to
a time that would have been between the last run and 'now' the
schedule is triggered instantly

for example:
schedule 08:00
last run today 08:00
now it is 12:00

before this patch:
update schedule to 11:00
 -> triggered instantly since we calculate from 08:00

after this patch:
update schedule to 11:00
 -> triggered tomorrow 11:00 since we calculate from today 12:00

the change in the enum type is ok, since by default serde does not
error on unknown fields and the new field is optional

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/tape/backup: list backed up snapshots on failed backup notification
Dominik Csapak [Fri, 23 Apr 2021 12:57:18 +0000 (14:57 +0200)]
api2/tape/backup: list backed up snapshots on failed backup notification

if a backup task failed (e.g. it was aborted), show the snapshots
which were successfully backed up in the notification

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: reload drive status on user actions
Dominik Csapak [Fri, 23 Apr 2021 10:52:45 +0000 (12:52 +0200)]
ui: tape: reload drive status on user actions

when the user start an action where we know that it locks the drive,
reload the tape store, so that the state is refreshed

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofile-restore: avoid unnecessary clone
Wolfgang Bumiller [Fri, 23 Apr 2021 11:22:30 +0000 (13:22 +0200)]
file-restore: avoid unnecessary clone

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofile-restore: add context to b64-decode error
Fabian Grünbichler [Fri, 23 Apr 2021 11:00:47 +0000 (13:00 +0200)]
file-restore: add context to b64-decode error

to make the following cryptic error:

 proxmox-file-restore failed: Error: Invalid byte 46, offset 5.

more understandable:

 proxmox-file-restore failed: Error: Failed base64-decoding path '/root.pxar.didx' - Invalid byte 46, offset 5.

when a user passes in a non-base64 path but sets `--base64`.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump version to 1.1.3-2
Thomas Lamprecht [Fri, 23 Apr 2021 08:03:38 +0000 (10:03 +0200)]
bump version to 1.1.3-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi2/node/status: extend node status
Dominik Csapak [Mon, 19 Apr 2021 11:02:03 +0000 (13:02 +0200)]
api2/node/status: extend node status

to be more on par with pve

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/nodes/status: use NodeStatus struct
Dominik Csapak [Mon, 19 Apr 2021 11:02:02 +0000 (13:02 +0200)]
api2/nodes/status: use NodeStatus struct

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/types: add necessary types for node status
Dominik Csapak [Mon, 19 Apr 2021 11:02:01 +0000 (13:02 +0200)]
api2/types: add necessary types for node status

we want to use concrete types instead of value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape: do not query density_code in SgTape::new()
Dietmar Maurer [Fri, 23 Apr 2021 07:56:44 +0000 (09:56 +0200)]
tape: do not query density_code in SgTape::new()

Because this can fail with NoSense/MediumChanged and other informational
Sense codes.

3 years agotape: format_media - implement special case for WORM media
Dietmar Maurer [Fri, 23 Apr 2021 06:33:13 +0000 (08:33 +0200)]
tape: format_media - implement special case for WORM media

3 years agotape: define and use MediumType enum
Dietmar Maurer [Fri, 23 Apr 2021 05:54:42 +0000 (07:54 +0200)]
tape: define and use MediumType enum

3 years agotape: use loaded media_type in format_media (instead of drive_density)
Dietmar Maurer [Fri, 23 Apr 2021 05:27:30 +0000 (07:27 +0200)]
tape: use loaded media_type in format_media (instead of drive_density)

Required to format LTO4 media loaded in LTO5 drive).

Also contains some SCSI code cleanups.

3 years agoserver/rest: fix new type ambiguity
Thomas Lamprecht [Thu, 22 Apr 2021 19:24:40 +0000 (21:24 +0200)]
server/rest: fix new type ambiguity

basically the same as commit eeff085d9d09028aba722d4106634e2f9c9ce931
Will be required once we get to use a newer rustc, at least the
client build for archlinux was broken due to this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 1.1.3-1 v1.1.3
Thomas Lamprecht [Thu, 22 Apr 2021 18:15:03 +0000 (20:15 +0200)]
bump version to 1.1.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofile-restore: support encrypted VM backups
Stefan Reiter [Thu, 22 Apr 2021 15:34:47 +0000 (17:34 +0200)]
file-restore: support encrypted VM backups

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoclient-tools: add crypto_parameters_keep_fd
Stefan Reiter [Thu, 22 Apr 2021 15:34:46 +0000 (17:34 +0200)]
client-tools: add crypto_parameters_keep_fd

same functionality as crypto_parameters, except it keeps the file
descriptor passed as "keyfd" open (and seeks to the beginning after
reading), if one is given.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore: don't force PBS_FINGERPRINT env var
Stefan Reiter [Thu, 22 Apr 2021 15:34:45 +0000 (17:34 +0200)]
file-restore: don't force PBS_FINGERPRINT env var

It is valid to not set it, in case the server has a valid certificate.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agotape: implement report_desnity
Dietmar Maurer [Thu, 22 Apr 2021 11:53:26 +0000 (13:53 +0200)]
tape: implement report_desnity

3 years agotape: fix FORMAT for LTO-4 drives
Dietmar Maurer [Thu, 22 Apr 2021 09:44:49 +0000 (11:44 +0200)]
tape: fix FORMAT for LTO-4 drives

FORMAT requires LTO-5 or newer, so we do a rewind/erase if FORMAT fails.

3 years agohttp proxy: implement read_connect_response()
Dietmar Maurer [Thu, 22 Apr 2021 07:42:35 +0000 (09:42 +0200)]
http proxy: implement read_connect_response()

Limit memory usage in case we get strange data from proxy.

3 years agofile-restore: allow extracting a full pxar archive
Stefan Reiter [Wed, 21 Apr 2021 13:18:09 +0000 (15:18 +0200)]
file-restore: allow extracting a full pxar archive

If the path for within the archive is empty, assume "/" to extract all
of it.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore: Add 'v' (Virtual) ArchiveEntry type
Stefan Reiter [Wed, 21 Apr 2021 13:18:08 +0000 (15:18 +0200)]
file-restore: Add 'v' (Virtual) ArchiveEntry type

For the actual partitions and blockdevices in a backup, which the
user sees like folders in the file-restore ui

Encoded as "None", to avoid cluttering DirEntryAttribute, where it
wouldn't make any sense to have.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofile-restore: print warnings on stderr
Stefan Reiter [Wed, 21 Apr 2021 13:18:07 +0000 (15:18 +0200)]
file-restore: print warnings on stderr

as we print JSON on stdout to be parsed

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore: don't list non-pxar/-img *idx archives
Stefan Reiter [Wed, 21 Apr 2021 13:18:06 +0000 (15:18 +0200)]
file-restore: don't list non-pxar/-img *idx archives

These can't be entered or restored anyway, and cause issues with catalog
files for example.

Also a clippy fix.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoHttpsConnector: add proxy support
Dietmar Maurer [Wed, 21 Apr 2021 11:17:02 +0000 (13:17 +0200)]
HttpsConnector: add proxy support

3 years agoHttpsConnector: code cleanup
Dietmar Maurer [Wed, 21 Apr 2021 11:17:01 +0000 (13:17 +0200)]
HttpsConnector: code cleanup

3 years agonew http client implementation SimpleHttp (avoid static HTTP_CLIENT)
Dietmar Maurer [Wed, 21 Apr 2021 11:17:00 +0000 (13:17 +0200)]
new http client implementation SimpleHttp (avoid static HTTP_CLIENT)

This one will have proxy support.