]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agodocs: add more thoughts about chunk size
Dietmar Maurer [Tue, 1 Dec 2020 09:28:06 +0000 (10:28 +0100)]
docs: add more thoughts about chunk size

3 years agodoc: add some thoughts about large chunk sizes
Dietmar Maurer [Tue, 1 Dec 2020 07:47:15 +0000 (08:47 +0100)]
doc: add some thoughts about large chunk sizes

3 years agocleanup: use extra file for StoreProgress
Dietmar Maurer [Tue, 1 Dec 2020 05:34:33 +0000 (06:34 +0100)]
cleanup: use extra file for StoreProgress

3 years agocleanup: remove unnecessary StoreProgress clone()
Dietmar Maurer [Tue, 1 Dec 2020 05:29:11 +0000 (06:29 +0100)]
cleanup: remove unnecessary StoreProgress clone()

3 years agoverify: use same progress as pull
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:21 +0000 (16:27 +0100)]
verify: use same progress as pull

percentage of verified groups, interpolating based on snapshot count
within the group. in most cases, this will also be closer to 'real'
progress since added snapshots (those which will be verified) in active
backup groups will be roughly evenly distributed, while number of total
snapshots per group will be heavily skewed towards those groups which
have existed the longest, even though most of those old snapshots will
only be re-verified very infrequently.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoprogress: add format variants
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:20 +0000 (16:27 +0100)]
progress: add format variants

for iterating over a single group, or iterating just on the group level

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agopull: factor out interpolated progress
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:19 +0000 (16:27 +0100)]
pull: factor out interpolated progress

and add group/snapshot count info.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoremove BackupGroup::list_groups
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:18 +0000 (16:27 +0100)]
remove BackupGroup::list_groups

BackupInfo::list_backup_groups is identical code-wise, and makes more
sense as entry point for listing groups.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: don't limit index listing to same filesystem
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:20 +0000 (16:22 +0100)]
gc: don't limit index listing to same filesystem

WalkDir does not follow symlinks by default anyway, and this behaviour
is not documented anywhere. e.g., if a sysadmin mounts 'extra storage'
for some backup group or type (not knowing that only metadata is stored
in those directories), GC will ignore all the indices contained within
and happily garbage collect their chunks..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: remove duplicate variable
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:19 +0000 (16:22 +0100)]
gc: remove duplicate variable

list_images already returns absolute paths, we don't need to prepend
anything.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: log index files found outside of expected scheme
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:18 +0000 (16:22 +0100)]
gc: log index files found outside of expected scheme

for safety reason, GC finds and marks all index files below the
datastore base path. as a result of regular operations, only index files
within the expected scheme of <TYPE>/<ID>/<TIMESTAMP> should exist.

add a small check + warning if the index list contains index files out
side of this expected scheme, so that an admin with shell access can
investigate.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: shorten progress messages
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:17 +0000 (16:22 +0100)]
gc: shorten progress messages

we have messages starting the phases anyway, and limit the number of
progress updates so that context remains available at all times.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agod/control bump
Wolfgang Bumiller [Mon, 30 Nov 2020 13:28:02 +0000 (14:28 +0100)]
d/control bump

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofile logger: remove test.log after test as well
Wolfgang Bumiller [Mon, 30 Nov 2020 13:13:21 +0000 (14:13 +0100)]
file logger: remove test.log after test as well

and a doc formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoderive PartialEq for Userid
Wolfgang Bumiller [Mon, 30 Nov 2020 13:08:57 +0000 (14:08 +0100)]
derive PartialEq for Userid

the manual implementation is equivalent

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotiny clippy hint
Wolfgang Bumiller [Mon, 30 Nov 2020 13:03:43 +0000 (14:03 +0100)]
tiny clippy hint

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodon't enforce Vec and String in tools::join
Wolfgang Bumiller [Mon, 30 Nov 2020 12:56:58 +0000 (13:56 +0100)]
don't enforce Vec and String in tools::join

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agominor cleanup
Wolfgang Bumiller [Mon, 30 Nov 2020 12:56:21 +0000 (13:56 +0100)]
minor cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools avoid unnecessary copying of parameters/properties
Wolfgang Bumiller [Mon, 30 Nov 2020 12:53:49 +0000 (13:53 +0100)]
tools avoid unnecessary copying of parameters/properties

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agominor cleanups
Wolfgang Bumiller [Mon, 30 Nov 2020 12:44:46 +0000 (13:44 +0100)]
minor cleanups

whitespace, formatting and superfluous lifetime annotations

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agonetwork helpers: fix fd leak in get_network_interfaces
Wolfgang Bumiller [Mon, 30 Nov 2020 10:10:32 +0000 (11:10 +0100)]
network helpers: fix fd leak in get_network_interfaces

This one always leaked.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agouse fd_change_cloexec helper
Wolfgang Bumiller [Mon, 30 Nov 2020 09:58:26 +0000 (10:58 +0100)]
use fd_change_cloexec helper

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agominor cleanup
Wolfgang Bumiller [Mon, 30 Nov 2020 09:49:43 +0000 (10:49 +0100)]
minor cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: stricter file descriptor guards
Wolfgang Bumiller [Mon, 30 Nov 2020 09:49:18 +0000 (10:49 +0100)]
pxar: stricter file descriptor guards

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoclient: use tools::pipe instead of nix
Wolfgang Bumiller [Mon, 30 Nov 2020 09:48:34 +0000 (10:48 +0100)]
client: use tools::pipe instead of nix

nix::unistd::pipe returns unguarded RawFds which should be
avoided

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agochanges for proxmox 0.8
Wolfgang Bumiller [Mon, 30 Nov 2020 08:53:59 +0000 (09:53 +0100)]
changes for proxmox 0.8

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox dep to 0.8.0
Wolfgang Bumiller [Mon, 30 Nov 2020 10:25:26 +0000 (11:25 +0100)]
bump proxmox dep to 0.8.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoui: fix usage of findRecord
Dominik Csapak [Thu, 26 Nov 2020 08:27:31 +0000 (09:27 +0100)]
ui: fix usage of findRecord

findRecord does not match exactly, but only at the beginning and
case insensitive, by default. Change all calls to be case sensitive
and an exactmatch (we never want the default behaviour afaics).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>