]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
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.

3 years agoMaybeTlsStream: implement poll_write_vectored()
Dietmar Maurer [Wed, 21 Apr 2021 11:16:59 +0000 (13:16 +0200)]
MaybeTlsStream: implement poll_write_vectored()

This is just an performance optimization.

3 years agohttp: rename EitherStream to MaybeTlsStream
Dietmar Maurer [Wed, 21 Apr 2021 11:16:58 +0000 (13:16 +0200)]
http: rename EitherStream to MaybeTlsStream

And rename the enum values. Added an additional enum called Proxied.

The enum in now more specialized, but we only use it for the http client anyways.

3 years agofix #3393: tools/xattr: allow xattr 'security.NTACL'
Dominik Csapak [Tue, 20 Apr 2021 09:19:53 +0000 (11:19 +0200)]
fix #3393: tools/xattr: allow xattr 'security.NTACL'

in some configurations, samba stores NTFS-ACLs in this xattr[0], so
we should backup (if we can)

altough the 'security' namespace is special (e.g. in use by
selinux, etc.) this value is normally only used by samba and we
should be able to back it up.

to restore it, the user needs at least 'CAP_SYS_ADMIN' rights, otherwise
it cannot be set

0: https://www.samba.org/samba/docs/current/man-html/vfs_acl_xattr.8.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape/changer/sg_pt_changer: read whole descriptor size for each entry
Dominik Csapak [Wed, 21 Apr 2021 10:24:57 +0000 (12:24 +0200)]
tape/changer/sg_pt_changer: read whole descriptor size for each entry

Some changer seem to append more data than we expect, but correctly
annotates that size in the subheader.

For each descriptor entry, read as much as the size given in the
subheader (or until the end of the reader), else our position in
the reader is wrong for the next entry, and we will parse
incorrect data.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape restore: avoid multiple stat calls for same chunk
Dietmar Maurer [Fri, 16 Apr 2021 11:17:17 +0000 (13:17 +0200)]
tape restore: avoid multiple stat calls for same chunk

3 years agotape restore: verify if all chunks exist
Dietmar Maurer [Fri, 16 Apr 2021 10:20:44 +0000 (12:20 +0200)]
tape restore: verify if all chunks exist

3 years agotape restore: simplify log (list datastores on single line)
Dietmar Maurer [Fri, 16 Apr 2021 09:35:05 +0000 (11:35 +0200)]
tape restore: simplify log (list datastores on single line)

3 years agotape restore: fix datastore locking
Dietmar Maurer [Fri, 16 Apr 2021 07:03:39 +0000 (09:03 +0200)]
tape restore: fix datastore locking

3 years agobump version to 1.1.2-1 v1.1.2
Thomas Lamprecht [Thu, 15 Apr 2021 11:26:59 +0000 (13:26 +0200)]
bump version to 1.1.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobackup verify: do not check every loop iteration for abort/shutdown
Thomas Lamprecht [Thu, 15 Apr 2021 10:56:30 +0000 (12:56 +0200)]
backup verify: do not check every loop iteration for abort/shutdown

only check every 1024'th, which is cheaper to do than a modulo, as we
can just mask the 10 least-significant-bits and check if the result
is zero.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobackup verify: unify check if chunk can be skipped
Thomas Lamprecht [Thu, 15 Apr 2021 10:36:50 +0000 (12:36 +0200)]
backup verify: unify check if chunk can be skipped

This also re-checks the corrupt chunk list before actually loading a
chunk.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoconfig: tfa: drop now unused schema::Updatable
Thomas Lamprecht [Thu, 15 Apr 2021 10:35:09 +0000 (12:35 +0200)]
config: tfa: drop now unused schema::Updatable

was used in a macro expansion, now handled otherwise

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape: do not try to backup unfinished backups
Dietmar Maurer [Thu, 15 Apr 2021 08:24:14 +0000 (10:24 +0200)]
tape: do not try to backup unfinished backups

3 years agobackup verify: re-check if we can skip a chunk in the actual verify loop
Thomas Lamprecht [Thu, 15 Apr 2021 08:00:04 +0000 (10:00 +0200)]
backup verify: re-check if we can skip a chunk in the actual verify loop

Fixes a non-negligible performance regression from commit
7f394c807bca3f451e77b6a1cf7de7c6e7df5f92

While we skip known-verified chunks in the stat-and-inode-sort loop,
those are only the ones from previous indexes. If there's a repeated
chunk in one index they would get re-verified more often as required.

So, add the check again explicitly to the read+verify loop.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocargo toml: update proxmox version
Thomas Lamprecht [Thu, 15 Apr 2021 07:56:09 +0000 (09:56 +0200)]
cargo toml: update proxmox version

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi2/access/user: remove password for @pbs users on removal
Dominik Csapak [Wed, 14 Apr 2021 13:30:42 +0000 (15:30 +0200)]
api2/access/user: remove password for @pbs users on removal

so that their password entry is not left in the shadow.json

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump version to 1.1.1-1
Thomas Lamprecht [Wed, 14 Apr 2021 12:50:41 +0000 (14:50 +0200)]
bump version to 1.1.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: tape: replace changer overview screenshot
Dylan Whyte [Wed, 14 Apr 2021 12:30:54 +0000 (14:30 +0200)]
docs: tape: replace changer overview screenshot

Replace previous screenshot with one that shows a more realistic amount
of drives.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agoverify: add comment for inode sorting
Thomas Lamprecht [Wed, 14 Apr 2021 10:55:49 +0000 (12:55 +0200)]
verify: add comment for inode sorting

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoverify: partially rust fmt
Thomas Lamprecht [Wed, 14 Apr 2021 10:53:19 +0000 (12:53 +0200)]
verify: partially rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobackup/verify: improve speed by sorting chunks by inode
Dominik Csapak [Tue, 13 Apr 2021 14:35:36 +0000 (16:35 +0200)]
backup/verify: improve speed by sorting chunks by inode

before reading the chunks from disk in the order of the index file,
stat them first and sort them by inode number.

this can have a very positive impact on read speed on spinning disks,
even with the additional stat'ing of the chunks.

memory footprint should be tolerable, for 1_000_000 chunks
we need about ~16MiB of memory (Vec of 64bit position + 64bit inode)
(assuming 4MiB Chunks, such an index would reference 4TiB of data)

two small benchmarks (single spinner, ext4) here showed an improvement from
~430 seconds to ~330 seconds for a 32GiB fixed index
and from
~160 seconds to ~120 seconds for a 10GiB dynamic index

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodocs: fix tape.cfg format description
Dietmar Maurer [Wed, 14 Apr 2021 12:30:20 +0000 (14:30 +0200)]
docs: fix tape.cfg format description

3 years agodocs: pmt - remove old linux driver options
Dietmar Maurer [Wed, 14 Apr 2021 12:26:39 +0000 (14:26 +0200)]
docs: pmt - remove old linux driver options

3 years agodocs: move tape config/syntax to appendix
Dietmar Maurer [Wed, 14 Apr 2021 12:14:30 +0000 (14:14 +0200)]
docs: move tape config/syntax to appendix

3 years agoui: tape/ChangerStatus: hide drive-slots without assigned drives
Dominik Csapak [Wed, 14 Apr 2021 12:11:22 +0000 (14:11 +0200)]
ui: tape/ChangerStatus: hide drive-slots without assigned drives

if a user has not configured a drive for a specified driveslot of the
changer, simply hide that slot

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodocs: faq: fix encryption link
Thomas Lamprecht [Wed, 14 Apr 2021 12:08:09 +0000 (14:08 +0200)]
docs: faq: fix encryption link

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: pve-integration: mention gui integration
Thomas Lamprecht [Wed, 14 Apr 2021 12:07:46 +0000 (14:07 +0200)]
docs: pve-integration: mention gui integration

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: update proxmox-tape status output
Dietmar Maurer [Wed, 14 Apr 2021 12:03:45 +0000 (14:03 +0200)]
docs: update proxmox-tape status output

3 years agoui: tape/ChangerStatus: add Format button to drivegrid
Dominik Csapak [Wed, 14 Apr 2021 10:34:08 +0000 (12:34 +0200)]
ui: tape/ChangerStatus: add Format button to drivegrid

so that the user can also format an already inserted tape directly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodocs: use defininition list for tape Terminology
Dietmar Maurer [Wed, 14 Apr 2021 11:25:29 +0000 (13:25 +0200)]
docs: use defininition list for tape Terminology

To avoid those strange line breaks in Field list labels.

3 years agodocs: gui: add short tape backup section
Thomas Lamprecht [Wed, 14 Apr 2021 10:46:53 +0000 (12:46 +0200)]
docs: gui: add short tape backup section

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: include tape backup in TOC
Thomas Lamprecht [Wed, 14 Apr 2021 10:43:04 +0000 (12:43 +0200)]
docs: include tape backup in TOC

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: tape: add a bit of text to changers for better image flow
Thomas Lamprecht [Wed, 14 Apr 2021 10:42:47 +0000 (12:42 +0200)]
docs: tape: add a bit of text to changers for better image flow

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: tape screenshots
Dylan Whyte [Tue, 13 Apr 2021 15:13:45 +0000 (17:13 +0200)]
docs: tape screenshots

Add tape screenshots throughout the tape docs with some references to the GUI

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agodocs: reorder maintenance & network after client usage/tools
Thomas Lamprecht [Wed, 14 Apr 2021 10:29:18 +0000 (12:29 +0200)]
docs: reorder maintenance & network after client usage/tools

The idea is that people first need to make actual backups before they
need to do maintenance tasks.
Network is already setup when installing with the ISO or on-top of
Debian, so that is not a priority either.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: use "Backup Storage" heading
Thomas Lamprecht [Wed, 14 Apr 2021 10:26:52 +0000 (12:26 +0200)]
docs: use "Backup Storage" heading

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape: rename erase to format
Dominik Csapak [Wed, 14 Apr 2021 10:21:37 +0000 (12:21 +0200)]
ui: tape: rename erase to format

erase is a different action, so correctly call it 'format'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agocleanup: remove debug println
Dietmar Maurer [Wed, 14 Apr 2021 08:39:29 +0000 (10:39 +0200)]
cleanup: remove debug println

3 years agoapi2/tape/restore: restore_chunk_archive: only ignore tape related errors
Dominik Csapak [Tue, 13 Apr 2021 10:58:58 +0000 (12:58 +0200)]
api2/tape/restore: restore_chunk_archive: only ignore tape related errors

when we get an error from the tape, we possibly want to ignore it,
i.e. when the file was incomplete, but we still want to error
out if the error came from e.g, the datastore, so we have to move
the error checking code to the 'next_chunk' call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump version to 1.1.0-1
Thomas Lamprecht [Tue, 13 Apr 2021 12:42:24 +0000 (14:42 +0200)]
bump version to 1.1.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: typo fixes
Thomas Lamprecht [Tue, 13 Apr 2021 12:42:01 +0000 (14:42 +0200)]
docs: typo fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: mention client repository and rework client installation
Thomas Lamprecht [Tue, 13 Apr 2021 12:37:36 +0000 (14:37 +0200)]
docs: mention client repository and rework client installation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: get help: actually link customer portal
Thomas Lamprecht [Tue, 13 Apr 2021 12:08:01 +0000 (14:08 +0200)]
docs: get help: actually link customer portal

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: client: add "Backup" to "Repository Locations" heading to avoid confusion
Thomas Lamprecht [Tue, 13 Apr 2021 12:07:24 +0000 (14:07 +0200)]
docs: client: add "Backup" to "Repository Locations" heading to avoid confusion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix regression tests
Dietmar Maurer [Tue, 13 Apr 2021 12:02:37 +0000 (14:02 +0200)]
fix regression tests

3 years agoTapeRead: add skip_data()
Dietmar Maurer [Tue, 13 Apr 2021 11:11:44 +0000 (13:11 +0200)]
TapeRead: add skip_data()

3 years agod/rules: update binary path for proxmox-backup-file-restore
Thomas Lamprecht [Tue, 13 Apr 2021 10:18:29 +0000 (12:18 +0200)]
d/rules: update binary path for proxmox-backup-file-restore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: update to track thiserror build dependency
Thomas Lamprecht [Tue, 13 Apr 2021 10:16:34 +0000 (12:16 +0200)]
d/control: update to track thiserror build dependency

was in Cargo.toml since commit
64ad7b706148b289d4ca67b87630cdc60f464cc

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoproxmox-backup-file-restore: fix various postinst bugs/bad-behavior
Thomas Lamprecht [Tue, 13 Apr 2021 09:39:54 +0000 (11:39 +0200)]
proxmox-backup-file-restore: fix various postinst bugs/bad-behavior

1. The exit was never called as `test ... || echo "foo" || exit 1`
   can never come to the exit, as echo will not fail

2. The echo was meant to be redirected to stderr (FD #2) but it was
   actually redirected to a file named '2'

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape/DriveStatus: show that no tape is loaded in grid title
Dominik Csapak [Tue, 13 Apr 2021 08:18:52 +0000 (10:18 +0200)]
ui: tape/DriveStatus: show that no tape is loaded in grid title

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/DriveStatus: remove buffer-mode
Dominik Csapak [Tue, 13 Apr 2021 08:18:51 +0000 (10:18 +0200)]
ui: tape/DriveStatus: remove buffer-mode

since this will almost always be set to '1', it has no real
value to show to the user

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape: SgTapeReader::read_block - disable reading beyond EOF
Dietmar Maurer [Tue, 13 Apr 2021 09:44:06 +0000 (11:44 +0200)]
tape: SgTapeReader::read_block - disable reading beyond EOF

3 years agotape: cleanup MediaCatalog on tape reuse
Dietmar Maurer [Tue, 13 Apr 2021 07:43:00 +0000 (09:43 +0200)]
tape: cleanup MediaCatalog on tape reuse

3 years agod/control: bump versioned dependency for proxmox-widget-toolkit
Thomas Lamprecht [Tue, 13 Apr 2021 07:14:09 +0000 (09:14 +0200)]
d/control: bump versioned dependency for proxmox-widget-toolkit

to ensure we have the moved out file browser widget available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: file browser: adapt to abi changes
Thomas Lamprecht [Tue, 13 Apr 2021 07:06:30 +0000 (09:06 +0200)]
ui: file browser: adapt to abi changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agouse FileBrowser from proxmox-widget-toolkit
Stefan Reiter [Thu, 1 Apr 2021 15:34:44 +0000 (17:34 +0200)]
use FileBrowser from proxmox-widget-toolkit

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoapi/datastore: allow pxar file download of entire archive
Stefan Reiter [Mon, 12 Apr 2021 15:32:52 +0000 (17:32 +0200)]
api/datastore: allow pxar file download of entire archive

Treat filepaths like "/root.pxar.didx" without a trailing slash as
wanting to download the entire archive content instead of erroring. The
zip-creation code already works fine for this scenario.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoui: index: drop enableTapeUI
Thomas Lamprecht [Mon, 12 Apr 2021 13:55:52 +0000 (15:55 +0200)]
ui: index: drop enableTapeUI

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: nav tree: code cleanup
Thomas Lamprecht [Mon, 12 Apr 2021 12:11:18 +0000 (14:11 +0200)]
ui: nav tree: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: nav tree: make datastore-add button less special cased
Thomas Lamprecht [Mon, 12 Apr 2021 12:10:57 +0000 (14:10 +0200)]
ui: nav tree: make datastore-add button less special cased

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: nav tree: code cleanup and unification between datastore and tapes
Thomas Lamprecht [Mon, 12 Apr 2021 12:09:29 +0000 (14:09 +0200)]
ui: nav tree: code cleanup and unification between datastore and tapes

datastore and tape entries are very similar but differ in some points
in such a way that a nice unification is not really that helpful, but
making similar key parts the same is still nice when reading the code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotools/async_io: do not error on Accept for StaticIncoming
Dominik Csapak [Thu, 8 Apr 2021 12:28:20 +0000 (14:28 +0200)]
tools/async_io: do not error on Accept for StaticIncoming

in proxmox-backup-proxy, we log and discard any errors on 'accept',
so that we can continue to server requests

in proxmox-backup-api, we just have the StaticIncoming that accepts,
which will forward any errors from the underlying TcpListener

this patch also logs and discards the errors, like in the proxy.
Otherwise it could happen that if the api-daemon has more files open
than the proxy, it will shut itself down because of a
'too many open files' error if there are many open connections

(the service should also restart on exit i think, but this is
a separate issue)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape: fix regression tests
Dietmar Maurer [Mon, 12 Apr 2021 12:08:05 +0000 (14:08 +0200)]
tape: fix regression tests

3 years agofix gathering io stats for zpools
Dominik Csapak [Mon, 12 Apr 2021 09:24:29 +0000 (11:24 +0200)]
fix gathering io stats for zpools

if a datastore or root is not used directly on the pool dir
(e.g. the installer creates 2 sub datasets ROOT/pbs-1), info in
/proc/self/mountinfo returns not the pool, but the path to the
dataset, which has no iostats itself in /proc/spl/kstat/zfs/
but only the pool itself

so instead of not gathering data at all, gather the info from the
underlying pool instead. if one has multiple datastores on the same
pool those rrd stats will be the same for all those datastores now
(instead of empty) similar to 'normal' directories

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotape: improve EOT error handling
Dietmar Maurer [Mon, 12 Apr 2021 09:25:40 +0000 (11:25 +0200)]
tape: improve EOT error handling

3 years agosgutils2: use thiserror to derive Error
Dietmar Maurer [Mon, 12 Apr 2021 07:36:29 +0000 (09:36 +0200)]
sgutils2: use thiserror to derive Error