]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agobump version to 1.0.5-1 v1.0.5
Thomas Lamprecht [Wed, 25 Nov 2020 14:29:54 +0000 (15:29 +0100)]
bump version to 1.0.5-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agorestore: print to STDERR
Fabian Grünbichler [Wed, 25 Nov 2020 13:28:51 +0000 (14:28 +0100)]
restore: print to STDERR

else restoring to STDOUT is broken..

Reported-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agocontrol: update versions
Dietmar Maurer [Wed, 25 Nov 2020 09:35:51 +0000 (10:35 +0100)]
control: update versions

3 years agobump version to 1.0.4-1 v1.0.4
Dietmar Maurer [Wed, 25 Nov 2020 05:38:16 +0000 (06:38 +0100)]
bump version to 1.0.4-1

3 years agodocs: fix renamed commands
Dietmar Maurer [Wed, 25 Nov 2020 07:02:34 +0000 (08:02 +0100)]
docs: fix renamed commands

3 years agocli: rename command "upload-log" to "snapshot upload-log"
Dietmar Maurer [Wed, 25 Nov 2020 06:06:55 +0000 (07:06 +0100)]
cli: rename command "upload-log" to "snapshot upload-log"

3 years agocli: rename command "forget" to "snapshot forget"
Dietmar Maurer [Wed, 25 Nov 2020 05:51:23 +0000 (06:51 +0100)]
cli: rename command "forget" to "snapshot forget"

3 years agocli: rename command "files" to "snapshot files"
Dietmar Maurer [Wed, 25 Nov 2020 05:47:18 +0000 (06:47 +0100)]
cli: rename command "files" to "snapshot files"

3 years agofingerprint: add new() method
Dietmar Maurer [Wed, 25 Nov 2020 06:56:37 +0000 (07:56 +0100)]
fingerprint: add new() method

3 years agofingerprint: add bytes() accessor
Fabian Grünbichler [Tue, 24 Nov 2020 13:05:19 +0000 (14:05 +0100)]
fingerprint: add bytes() accessor

needed for libproxmox-backup-qemu0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: fix broken gettext use
Thomas Lamprecht [Tue, 24 Nov 2020 23:21:04 +0000 (00:21 +0100)]
ui: fix broken gettext use

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocli: use new alias feature for "snapshots"
Dietmar Maurer [Tue, 24 Nov 2020 12:01:06 +0000 (13:01 +0100)]
cli: use new alias feature for "snapshots"

Now maps to "snapshot list".

3 years agoclient: add 'snapshot notes show/update' command
Dominik Csapak [Tue, 24 Nov 2020 09:09:29 +0000 (10:09 +0100)]
client: add 'snapshot notes show/update' command

to show and update snapshot notes from the cli

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump version to 1.0.3-1 v1.0.3
Thomas Lamprecht [Tue, 24 Nov 2020 07:56:18 +0000 (08:56 +0100)]
bump version to 1.0.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agogui: add snapshot/file fingerprint tooltip
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:43 +0000 (17:38 +0100)]
gui: add snapshot/file fingerprint tooltip

display short key ID, like backend's Display trait.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agolist_snapshots: return manifest fingerprint
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:42 +0000 (17:38 +0100)]
list_snapshots: return manifest fingerprint

for display in clients.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agorefactor BackupInfo -> SnapshotListItem helper
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:41 +0000 (17:38 +0100)]
refactor BackupInfo -> SnapshotListItem helper

before adding more fields to the tuple, let's just create the struct
inside the match arms to improve readability.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoexpose previous backup time in backup env
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:40 +0000 (17:38 +0100)]
expose previous backup time in backup env

and use this information to add more information to client backup log
and guide the download manifest decision.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump version to 1.0.2-1
Thomas Lamprecht [Tue, 24 Nov 2020 07:32:09 +0000 (08:32 +0100)]
bump version to 1.0.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoverification: fix message in notification mail
Fabian Grünbichler [Mon, 23 Nov 2020 09:57:16 +0000 (10:57 +0100)]
verification: fix message in notification mail

the errors Vec can contain failed groups as well (e.g., if a group has
no or an invalid owner).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoverification job: log failed dirs
Fabian Grünbichler [Mon, 23 Nov 2020 09:57:15 +0000 (10:57 +0100)]
verification job: log failed dirs

else users have to manually search through a potentially very long task
log to find the entries that are different.. this is the same summary
printed at the end of a manual verify task.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agocleanup: remove dead code
Dietmar Maurer [Tue, 24 Nov 2020 07:03:00 +0000 (08:03 +0100)]
cleanup: remove dead code

3 years agopaperkey: refactor common code
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:38 +0000 (17:38 +0100)]
paperkey: refactor common code

from formatting functions to main function, and pass along the key data
lines instead of the full string.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclient: check fingerprint after downloading manifest
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:37 +0000 (17:38 +0100)]
client: check fingerprint after downloading manifest

this is stricter than the check that happened on manifest load, as it
also fails if the manifest is signed but we don't have a key available.

add some additional output at the start of a backup to indicate whether
a previous manifest is available to base the backup on.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomanifest: check fingerprint when loading with key
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:36 +0000 (17:38 +0100)]
manifest: check fingerprint when loading with key

otherwise loading will run into the signature mismatch which is
technically true, but not the complete picture in this case.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agofix #3139: add key fingerprint to manifest
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:35 +0000 (17:38 +0100)]
fix #3139: add key fingerprint to manifest

if the manifest is signed/the contained archives/blobs are encrypted.
stored in 'unprotected' area, since there is already a strong binding
between key and manifest via the signature, and this avoids breaking
backwards compatibility for a simple usability improvement.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agocli: cleanup 'key show' - use format_and_print_result_full
Dietmar Maurer [Tue, 24 Nov 2020 06:19:15 +0000 (07:19 +0100)]
cli: cleanup 'key show' - use format_and_print_result_full

We now expose all key derivation functions on the cli, so users can
choose between scrypt or pbkdf2.

3 years agoclient: add 'key show' command
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:34 +0000 (17:38 +0100)]
client: add 'key show' command

for (pretty-)printing a keyfile.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclient: print key fingerprint and master key
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:33 +0000 (17:38 +0100)]
client: print key fingerprint and master key

for operations where it makes sense.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agokey: add fingerprint to key config
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:32 +0000 (17:38 +0100)]
key: add fingerprint to key config

and set/generate it on
- key creation
- key passphrase change
- key decryption if not already set
- key encryption with master key

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agocrypt config: add fingerprint mechanism
Fabian Grünbichler [Fri, 20 Nov 2020 16:38:31 +0000 (17:38 +0100)]
crypt config: add fingerprint mechanism

by computing the ID digest of a hash of a static string.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoOnlineHelpInfo.js problems
Dietmar Maurer [Mon, 23 Nov 2020 11:51:04 +0000 (12:51 +0100)]
OnlineHelpInfo.js problems

Anybody known why I always get the following diff:

3 years agoupdate debian/control
Dietmar Maurer [Mon, 23 Nov 2020 11:12:58 +0000 (12:12 +0100)]
update debian/control

3 years agoui: datastore content: use our keep field for group pruning
Thomas Lamprecht [Sat, 21 Nov 2020 18:51:58 +0000 (19:51 +0100)]
ui: datastore content: use our keep field for group pruning

sets some defaults and provides the clear trigger, so less code and
slightly nicer UX.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump dependency on proxmox to 0.7.1
Thomas Lamprecht [Fri, 20 Nov 2020 16:38:25 +0000 (17:38 +0100)]
bump dependency on proxmox to 0.7.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix systemd-encoded upid strings in http client
Dominik Csapak [Thu, 19 Nov 2020 09:02:52 +0000 (10:02 +0100)]
fix systemd-encoded upid strings in http client

since we systemd-encode parts of the upid string, and those can contain
characters that are invalid in urls (e.g. '\'), we have to percent encode
those

add a 'percent_encode_component' helper, so that we can maybe change
the AsciiSet for all uses at the same time

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoprune sim: make numberfields more similar to PBS's
Fabian Ebner [Wed, 11 Nov 2020 09:07:03 +0000 (10:07 +0100)]
prune sim: make numberfields more similar to PBS's

by creating a new class that adds a clear trigger and also uses the
clear-trigger image. Code was taken from the one in PBS's prune window,
but we have default values here, so a bit of adapting was necessary. For
example, we don't want to reset to the original value (which might have
been one of the defaults) when clearing, but always to 'null'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agogc: treat .bad files like regular chunks
Stefan Reiter [Thu, 12 Nov 2020 14:50:08 +0000 (15:50 +0100)]
gc: treat .bad files like regular chunks

Simplify the phase 2 code by treating .bad files just like regular
chunks, with the exception of stat logging.

To facilitate, we need to touch .bad files in phase 1. We only do this
under the condition that 1) the original chunk is missing (as before),
and 2) the original chunk is still referenced somewhere (since the code
lives in the error handler for a failed chunk touch, it only gets called
for chunks we expect to be there, i.e. ones that are referenced).

Untouched they will then be cleaned up after 24 hours (or after the last
longer-running task finishes).

Reason 2) is also a fix for .bad files not being cleaned up at all if
the original is no longer referenced anywhere (e.g. a user deleting all
snapshots after seeing some corrupt chunks appear).

cond_touch_path is introduced to touch arbitrary paths in the chunk
store with the same logic as touching chunks.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoapi: include store in invalid owner errors
Fabian Grünbichler [Thu, 12 Nov 2020 10:30:34 +0000 (11:30 +0100)]
api: include store in invalid owner errors

since a group might exist in plenty stores

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agodrop now unused BackupInfo::list_backups
Fabian Grünbichler [Thu, 12 Nov 2020 10:30:33 +0000 (11:30 +0100)]
drop now unused BackupInfo::list_backups

all global backup listing now happens via BackupGroup

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoapi: filter snapshot counts
Fabian Grünbichler [Thu, 12 Nov 2020 10:30:32 +0000 (11:30 +0100)]
api: filter snapshot counts

unprivileged users should only see the counts related to their part of
the datastore.

while we're at it, switch to a list groups, filter groups, count
snapshots approach (like list_snapshots) to speedup calls to this
endpoint when many unprivileged users share a datastore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoapi: make expensive parts of datastore status opt-in
Fabian Grünbichler [Thu, 12 Nov 2020 10:30:31 +0000 (11:30 +0100)]
api: make expensive parts of datastore status opt-in

used in the PBS GUI, but also for PVE usage queries which don't need all
the extra expensive information..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoimprove group/snapshot listing
Fabian Grünbichler [Thu, 12 Nov 2020 10:30:30 +0000 (11:30 +0100)]
improve group/snapshot listing

by listing groups first, then filtering, then listing group snapshots.

this cuts down the number of openat/getdirents calls for users that just
have a partial view of the datastore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclient/http_client: add put method
Dominik Csapak [Fri, 13 Nov 2020 09:38:48 +0000 (10:38 +0100)]
client/http_client: add put method

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoclient: expose all-file-systems option
Fabian Ebner [Mon, 16 Nov 2020 09:22:47 +0000 (10:22 +0100)]
client: expose all-file-systems option

Useful to avoid the need for a long (and possibly changing) list of include-dev
options in certain situations, e.g. nested ZFS file systems. The option is
already implemented and seems to work as expected. The checks for virtual
filesystems are not affected by this option.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: datastores: hide "no datastore" box by default
Thomas Lamprecht [Mon, 16 Nov 2020 15:55:31 +0000 (16:55 +0100)]
ui: datastores: hide "no datastore" box by default

avoids that it shows during store load, we do not know if there are
no datastores at that point and have already a loading mask.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: improve comment behaviour for datastore Summary
Dominik Csapak [Fri, 13 Nov 2020 14:02:36 +0000 (15:02 +0100)]
ui: improve comment behaviour for datastore Summary

when we could not load the config (e.g. missing permissions)
show the comment from the global datastore-list

also show a messagebox for a load error instead of setting
the text of the comment box

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: DataStoreList: show message when there are no datastores
Dominik Csapak [Fri, 13 Nov 2020 14:02:35 +0000 (15:02 +0100)]
ui: DataStoreList: show message when there are no datastores

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: DataStoreList: remove datastores also from hash
Dominik Csapak [Fri, 13 Nov 2020 14:02:34 +0000 (15:02 +0100)]
ui: DataStoreList: remove datastores also from hash

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agopxar: avoid including archive root's exclude patterns in .pxarexclude-cli
Fabian Ebner [Thu, 12 Nov 2020 11:38:06 +0000 (12:38 +0100)]
pxar: avoid including archive root's exclude patterns in .pxarexclude-cli

The patterns from the archive root's .pxarexclude file are already present in
self.patterns when encode_pxarexclude_cli is called. Pass along the number of
CLI patterns and slice accordingly.

Suggested-By: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agovisibility cleanups
Wolfgang Bumiller [Thu, 12 Nov 2020 10:49:38 +0000 (11:49 +0100)]
visibility cleanups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: only generate .pxarexclude-cli if there were CLI parameters
Fabian Ebner [Thu, 12 Nov 2020 09:03:52 +0000 (10:03 +0100)]
pxar: only generate .pxarexclude-cli if there were CLI parameters

previously a .pxarexclude entry in the root of the archive caused the file to
be generated as well, because the patterns are read before calling
generate_directory_file_list and within the function it wasn't possible to
distinguish between a pattern coming from the CLI and a pattern coming from
archive/root/.pxarexclude

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: include .pxarexclude files in the archive
Fabian Ebner [Thu, 12 Nov 2020 09:03:51 +0000 (10:03 +0100)]
pxar: include .pxarexclude files in the archive

The documentation states:
.pxarexclude files are treated as regular files and will be included in the
backup archive.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: fix anchored exclusion at archive root
Fabian Ebner [Thu, 12 Nov 2020 09:03:50 +0000 (10:03 +0100)]
pxar: fix anchored exclusion at archive root

There is no leading slash in an entry's full_path, causing an anchored
exclude at the root level to fail, e.g. having "/name" as the content of the
file archive/root/.pxarexclude didn't match the file archive/root/name

Fix this by prepending a leading slash before matching.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoremove unused function
Wolfgang Bumiller [Thu, 12 Nov 2020 10:14:57 +0000 (11:14 +0100)]
remove unused function

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofollouwp: whitespace cleanup
Thomas Lamprecht [Thu, 12 Nov 2020 10:02:45 +0000 (11:02 +0100)]
follouwp: whitespace cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: apt/versions: fix running_kernel string for unknown package case
Mira Limbeck [Thu, 12 Nov 2020 09:52:20 +0000 (10:52 +0100)]
api: apt/versions: fix running_kernel string for unknown package case

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
3 years agomanager: versions: non-verbose should actually print server pkg info
Thomas Lamprecht [Thu, 12 Nov 2020 09:28:03 +0000 (10:28 +0100)]
manager: versions: non-verbose should actually print server pkg info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapt: use typed response for get_versions
Stefan Reiter [Thu, 12 Nov 2020 09:12:54 +0000 (10:12 +0100)]
apt: use typed response for get_versions

...and cleanup get_versions for manager CLI.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoui: tell ESLint to be strict in check target
Thomas Lamprecht [Thu, 12 Nov 2020 08:50:48 +0000 (09:50 +0100)]
ui: tell ESLint to be strict in check target

the .lint-incremental target, which is implicitly used by the install
target, is still more forgiving to allow faster "change, build, test"
iteration when developing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: update for new pin-project dependency
Thomas Lamprecht [Thu, 12 Nov 2020 08:54:29 +0000 (09:54 +0100)]
d/control: update for new pin-project dependency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocleanup clippy leftovers
Wolfgang Bumiller [Thu, 12 Nov 2020 08:42:53 +0000 (09:42 +0100)]
cleanup clippy leftovers

this used to contain a pointer cast, now it doesn't

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agouse pin-project to remove more unsafe blocks
Wolfgang Bumiller [Tue, 10 Nov 2020 13:33:33 +0000 (14:33 +0100)]
use pin-project to remove more unsafe blocks

we already have it in our dependency tree, so use it

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomanager: versions: unify printing
Thomas Lamprecht [Wed, 11 Nov 2020 17:30:19 +0000 (18:30 +0100)]
manager: versions: unify printing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd versions command to proxmox-backup-manager
Mira Limbeck [Tue, 10 Nov 2020 13:22:18 +0000 (14:22 +0100)]
add versions command to proxmox-backup-manager

Add the versions command to proxmox-backup-manager with a similar output
to pveversion [-v]. It prints the packages line by line with only the
package name, followed by the version and, for proxmox-backup and
proxmox-backup-server, some additional information (running kernel,
running version).

In addition it supports the optional output-format parameter which can
be used to print the complete data in either json, json-pretty or text
format. If output-format is specified, the --verbose parameter is
ignored and the detailed list of packages is printed.

With the addition of the versions command, the report is extended as
well.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
3 years agoapi: versions: add version also in server package unknown case
Thomas Lamprecht [Wed, 11 Nov 2020 16:54:43 +0000 (17:54 +0100)]
api: versions: add version also in server package unknown case

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: versions: rust fmt cleanups
Thomas Lamprecht [Wed, 11 Nov 2020 16:20:53 +0000 (17:20 +0100)]
api: versions: rust fmt cleanups

line length limit is 100

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: apt update info: do not serialize extra info if none
Thomas Lamprecht [Wed, 11 Nov 2020 16:20:33 +0000 (17:20 +0100)]
api: apt update info: do not serialize extra info if none

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd extra_info field to APTUpdateInfo
Mira Limbeck [Tue, 10 Nov 2020 13:22:17 +0000 (14:22 +0100)]
add extra_info field to APTUpdateInfo

Add an optional string field to APTUpdateInfo which can be used for
extra information.

This is used for passing running kernel and running version information
in the versions API call together with proxmox-backup and
proxmox-backup-server.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
3 years agoapi2/node/syslog: use 'real_service_name' here also
Dominik Csapak [Wed, 11 Nov 2020 12:41:07 +0000 (13:41 +0100)]
api2/node/syslog: use 'real_service_name' here also

for now this only does the 'postfix' -> 'postfix@-' conversion,
fixes the issue that we only showed the 'postfix' service syslog
(which is rather empty in a default setup) instead of the instance one

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agolog source of encryption key
Stoiko Ivanov [Wed, 11 Nov 2020 15:33:22 +0000 (15:33 +0000)]
log source of encryption key

This patch prints the source of the encryption key when running
operations with proxmox-backup-client.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoinform user when using default encryption key
Stoiko Ivanov [Wed, 11 Nov 2020 15:33:21 +0000 (15:33 +0000)]
inform user when using default encryption key

Currently if you generate a default encryption key:
`proxmox-backup-client key create --kdf none`

all backup operations which don't explicitly disable encryption will be
encrypted with this key.

I found it quite surprising, that my backups were all encrypted without
me explicitly specfying neither key nor encryption mode

This patch informs the user when the default key is used (and no
crypt-mode is provided explicitly)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoreport: use '$' instead of '#' for showing commands
Oguz Bektas [Tue, 10 Nov 2020 15:01:46 +0000 (16:01 +0100)]
report: use '$' instead of '#' for showing commands

since some files can contain '#' character for comments. (i.e.,
/etc/hosts)

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agoreport: fix grammar error
Oguz Bektas [Tue, 10 Nov 2020 14:46:04 +0000 (15:46 +0100)]
report: fix grammar error

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agoui: UserView: render name as 'Firstname Lastname'
Dominik Csapak [Wed, 11 Nov 2020 12:34:14 +0000 (13:34 +0100)]
ui: UserView: render name as 'Firstname Lastname'

instead of only the firstname

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agomake user properties deletable
Dominik Csapak [Wed, 11 Nov 2020 12:34:13 +0000 (13:34 +0100)]
make user properties deletable

by using our usual pattern for the update call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agorest: check for disabled token (user)
Fabian Grünbichler [Wed, 11 Nov 2020 10:47:36 +0000 (11:47 +0100)]
rest: check for disabled token (user)

when authenticating a token, and not just when authenticating a
user/ticket.

Reported-By: Dominik Jäger <d.jaeger@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump version to 1.0.1-1 v1.0.1
Thomas Lamprecht [Wed, 11 Nov 2020 09:20:32 +0000 (10:20 +0100)]
bump version to 1.0.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: check in new dependnecies to generated control
Thomas Lamprecht [Wed, 11 Nov 2020 09:21:24 +0000 (10:21 +0100)]
d/control: check in new dependnecies to generated control

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: faq: fix first releases
Thomas Lamprecht [Wed, 11 Nov 2020 09:06:53 +0000 (10:06 +0100)]
docs: faq: fix first releases

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: fix prune retention example
Thomas Lamprecht [Wed, 11 Nov 2020 09:06:36 +0000 (10:06 +0100)]
docs: fix prune retention example

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodaemon: rename method, endless loop, bail on exec error
Thomas Lamprecht [Wed, 11 Nov 2020 08:55:36 +0000 (09:55 +0100)]
daemon: rename method, endless loop, bail on exec error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodaemon: add hack for sd_notify
Dominik Csapak [Wed, 11 Nov 2020 08:27:51 +0000 (09:27 +0100)]
daemon: add hack for sd_notify

sd_notify is not synchronous, iow. it only waits until the message
reaches the queue not until it is processed by systemd

when the process that sent such a message exits before systemd could
process it, it cannot be associated to the correct pid

so in case of reloading, we send a message with 'MAINPID=<newpid>'
to signal that it will change. if now the old process exits before
systemd knows this, it will not accept the 'READY=1' message from the
child, since it rejects the MAINPID change

since there is no (AFAICS) library interface to check the unit status,
we use 'systemctl is-active <SERVICE_NAME>' to check the state until
it is not 'reloading' anymore.

on newer systemd versions, there is 'sd_notify_barrier' which would
allow us to wait for systemd to have all messages from the current
pid to be processed before acknowledging to the child, but on buster
the systemd version is to old...

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoprune sim: avoid colon to separate keep desc from count
Thomas Lamprecht [Wed, 11 Nov 2020 07:20:09 +0000 (08:20 +0100)]
prune sim: avoid colon to separate keep desc from count

hack for space issues for monthly keeps and >9 counts

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoprune sim: make backup schedule a form, bind update button to its validity
Thomas Lamprecht [Wed, 11 Nov 2020 07:11:46 +0000 (08:11 +0100)]
prune sim: make backup schedule a form, bind update button to its validity

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoprune sim: do not use unecesarry variable, declare in line
Thomas Lamprecht [Wed, 11 Nov 2020 07:11:16 +0000 (08:11 +0100)]
prune sim: do not use unecesarry variable, declare in line

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoprune sim: set min-heigth for calendar day cells
Thomas Lamprecht [Wed, 11 Nov 2020 07:10:43 +0000 (08:10 +0100)]
prune sim: set min-heigth for calendar day cells

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: datastore add: set default schedule
Thomas Lamprecht [Wed, 11 Nov 2020 06:49:01 +0000 (07:49 +0100)]
ui: datastore add: set default schedule

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: shorten automatic ID length a bit
Thomas Lamprecht [Wed, 11 Nov 2020 06:30:52 +0000 (07:30 +0100)]
ui: shorten automatic ID length a bit

Without hyphens, we had 20 hex digits, so ~80 bit which is probably overkill.
Use 12 (13 with hyphen), this is still 48 bit.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: datastore summary: drop removed bytes display
Thomas Lamprecht [Wed, 11 Nov 2020 06:27:21 +0000 (07:27 +0100)]
ui: datastore summary: drop removed bytes display

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: add missing dependencies for non ISO installations
Thomas Lamprecht [Wed, 11 Nov 2020 06:26:05 +0000 (07:26 +0100)]
d/control: add missing dependencies for non ISO installations

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocargo: extend authors list
Thomas Lamprecht [Tue, 10 Nov 2020 13:42:41 +0000 (14:42 +0100)]
cargo: extend authors list

this was mostly selected by executing

and adding those with more than a hand full of commits, so no hard
feelings here, this was definitively also a team effort to get stuff
polished!

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 1.0.0-1
Thomas Lamprecht [Tue, 10 Nov 2020 13:36:45 +0000 (14:36 +0100)]
bump version to 1.0.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: drop debug beta code
Thomas Lamprecht [Tue, 10 Nov 2020 13:47:42 +0000 (14:47 +0100)]
ui: drop debug beta code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopostinst: fix version check for remote.cfg cleanup
Fabian Grünbichler [Tue, 10 Nov 2020 13:35:37 +0000 (14:35 +0100)]
postinst: fix version check for remote.cfg cleanup

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: improve activeTab selection from fragment and state
Dominik Csapak [Tue, 10 Nov 2020 13:16:16 +0000 (14:16 +0100)]
ui: improve activeTab selection from fragment and state

handle invalid fragments for tabs, as well as not rendered tabpanels

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotools::runtime: pin_mut instead of unsafe block
Wolfgang Bumiller [Tue, 10 Nov 2020 13:18:07 +0000 (14:18 +0100)]
tools::runtime: pin_mut instead of unsafe block

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoasync_io: require Unpin for EitherStream and HyperAccept
Wolfgang Bumiller [Tue, 10 Nov 2020 13:14:43 +0000 (14:14 +0100)]
async_io: require Unpin for EitherStream and HyperAccept

We use it with Unpin types and this way we get rid of a lot
of `unsafe` blocks.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoverify: cleanup logging order/messages
Fabian Grünbichler [Tue, 10 Nov 2020 12:52:50 +0000 (13:52 +0100)]
verify: cleanup logging order/messages

otherwise we end up printing warnings before the start message..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoverify: log/warn on invalid owner
Fabian Grünbichler [Tue, 10 Nov 2020 12:52:49 +0000 (13:52 +0100)]
verify: log/warn on invalid owner

in order to trigger a notification/make the problem more visible than
just in syslog.

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