]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agobump version to 0.8.9-1 v0.8.9
Thomas Lamprecht [Fri, 24 Jul 2020 09:24:56 +0000 (11:24 +0200)]
bump version to 0.8.9-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoserver/state: add spawn_internal_task and use it for websockets
Dominik Csapak [Thu, 23 Jul 2020 13:20:13 +0000 (15:20 +0200)]
server/state: add spawn_internal_task and use it for websockets

is a helper to spawn an internal tokio task without it showing up
in the task list

it is still tracked for reload and notifies the last_worker_listeners

this enables the console to survive a reload of proxmox-backup-proxy

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotermproxy: let users stop the termproxy task
Dominik Csapak [Thu, 23 Jul 2020 13:20:12 +0000 (15:20 +0200)]
termproxy: let users stop the termproxy task

for that we have to do a select on the workers abort_future

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofix 2885: bail on duplicate backup target
Stoiko Ivanov [Thu, 23 Jul 2020 16:16:36 +0000 (16:16 +0000)]
fix 2885: bail on duplicate backup target

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoclient: log archive upload duration more accurate, fix grammar
Thomas Lamprecht [Fri, 24 Jul 2020 08:13:40 +0000 (10:13 +0200)]
client: log archive upload duration more accurate, fix grammar

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclient: avoid division by zero in avg speed calculation, be more accurate
Thomas Lamprecht [Fri, 24 Jul 2020 07:49:44 +0000 (09:49 +0200)]
client: avoid division by zero in avg speed calculation, be more accurate

using micros vs. as_secs_f64 allows to have it calculated as usize
bytes, easier to handle - this was also used when it still lived in
upload_chunk_info_stream

Co-authored-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 0.8.8-1 v0.8.8
Thomas Lamprecht [Thu, 23 Jul 2020 09:33:30 +0000 (11:33 +0200)]
bump version to 0.8.8-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotermproxy: cmd: support upgrade
Thomas Lamprecht [Thu, 23 Jul 2020 11:12:13 +0000 (13:12 +0200)]
termproxy: cmd: support upgrade

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: add dependecy for pve-xtermjs
Thomas Lamprecht [Thu, 23 Jul 2020 10:45:56 +0000 (12:45 +0200)]
d/control: add dependecy for pve-xtermjs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: termproxy: fix ACL as /nodes is /system
Thomas Lamprecht [Thu, 23 Jul 2020 10:38:10 +0000 (12:38 +0200)]
api: termproxy: fix ACL as /nodes is /system

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: apt: use schema default const for quiet param
Thomas Lamprecht [Thu, 23 Jul 2020 10:25:20 +0000 (12:25 +0200)]
api: apt: use schema default const for quiet param

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoupdate proxmox crate to get latest websocket implementation
Thomas Lamprecht [Thu, 23 Jul 2020 10:15:49 +0000 (12:15 +0200)]
update proxmox crate to get latest websocket implementation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: add Console Button
Dominik Csapak [Tue, 21 Jul 2020 09:10:40 +0000 (11:10 +0200)]
ui: add Console Button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoserver/rest: add console to index
Dominik Csapak [Tue, 21 Jul 2020 09:10:39 +0000 (11:10 +0200)]
server/rest: add console to index

register the console template and render it when the 'console' parameter
is given

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/nodes: add termproxy and vncwebsocket api calls
Dominik Csapak [Tue, 21 Jul 2020 09:10:38 +0000 (11:10 +0200)]
api2/nodes: add termproxy and vncwebsocket api calls

Even though it has nothing to do with vnc, we keep the name of the api
call for compatibility with our xtermjs client.

termproxy:
verifies that the user is allowed to open a console and starts
termproxy with the correct parameters

starts a TcpListener on "localhost:0" so that the kernel decides the
port (instead of trying to rerserving like in pve). Then it
leaves the fd open for termproxy and gives the number as port
and tells it via '--port-as-fd' that it should interpret this
as an open fd

the vncwebsocket api call checks the 'vncticket' (name for compatibility)
and connects the remote side (after an Upgrade) with a local TcpStream
connecting to the port given via WebSocket from the proxmox crate

to make sure that only the client can connect that called termproxy and
no one can connect to an arbitrary port on the host we have to include
the port in the ticket data

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/access: implement term ticket
Dominik Csapak [Tue, 21 Jul 2020 09:10:37 +0000 (11:10 +0200)]
api2/access: implement term ticket

modeled after pves/pmgs vncticket (i substituted the vnc with term)
by putting the path and username as secret data in the ticket

when sending the ticket to /access/ticket it only verifies it,
checks the privs on the path and does not generate a new ticket

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoserver/config: add mechanism to update template
Dominik Csapak [Tue, 21 Jul 2020 09:10:36 +0000 (11:10 +0200)]
server/config: add mechanism to update template

instead of exposing handlebars itself, offer a register_template and
a render_template ourselves.

render_template checks if the template file was modified since
the last render and reloads it when necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi: apt update must run protected
Thomas Lamprecht [Thu, 23 Jul 2020 09:45:46 +0000 (11:45 +0200)]
api: apt update must run protected

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: apt: support refreshing package index
Thomas Lamprecht [Thu, 23 Jul 2020 09:19:52 +0000 (11:19 +0200)]
api: apt: support refreshing package index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: epilog: point "Proxmox Backup" hyperlink to pbs wiki
Dylan Whyte [Fri, 17 Jul 2020 09:24:28 +0000 (11:24 +0200)]
docs: epilog: point "Proxmox Backup" hyperlink to pbs wiki

This changes the "Proxmox Backup" hyperlink, which is referred to throughout the
Proxmox Backup Server documentation. Following this patch, it now points to the
pbs wiki page, rather than the unpublished product page.

*Note: This change is only a temporary measure, while the product page
(https://www.proxmox.com/proxmox-backup) is in development.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agoadd .../apt/update API call
Stefan Reiter [Tue, 21 Jul 2020 11:41:07 +0000 (13:41 +0200)]
add .../apt/update API call

Depends on patched apt-pkg-native-rs. Changelog-URL detection is
inspired by PVE perl code for now, though marked with fixme to use 'apt
changelog' later on, if/when our repos have APT-compatible changelogs
set up.

list_installed_apt_packages iterates all packages and creates an
APTUpdateInfo with detailed information for every package matched by the
given filter Fn.

Sadly, libapt-pkg has some questionable design choices regarding their
use of 'iterators', which means quite a bit of nesting...

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobackup manifest: make lookup_file_info public
Thomas Lamprecht [Thu, 23 Jul 2020 08:39:18 +0000 (10:39 +0200)]
backup manifest: make lookup_file_info public

useful to get info like, was the previous snapshot encrypted in
libproxmox-backup-qemu

Requested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: remove duplicate feature
Moayad Almalat [Thu, 23 Jul 2020 08:03:18 +0000 (10:03 +0200)]
docs: remove duplicate feature

Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
3 years agoclient: log index.json upload only when verbose
Thomas Lamprecht [Thu, 23 Jul 2020 08:04:36 +0000 (10:04 +0200)]
client: log index.json upload only when verbose

I mean the user expects that we know what archives, fidx or didx, are
in a backup, so this is internal info and should not be logged by
default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclient: don't use debug format for printing BackupRepository
Thomas Lamprecht [Thu, 23 Jul 2020 07:43:20 +0000 (09:43 +0200)]
client: don't use debug format for printing BackupRepository

It implements the fmt::Display  trait after all

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclient writer: do not output chunklist for now on verbose true
Thomas Lamprecht [Thu, 23 Jul 2020 07:49:29 +0000 (09:49 +0200)]
client writer: do not output chunklist for now on verbose true

Verbosity needs to be a non binary level, as this now is just
debug/development info, for endusers normally to much.

We want to have it available, but with a much higher verbosity level.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclient: rework logging upload size, bandwidth, ... info
Thomas Lamprecht [Thu, 23 Jul 2020 07:45:48 +0000 (09:45 +0200)]
client: rework logging upload size, bandwidth, ... info

Track reused size and chunk counts.
Log reused size and use pretty print for all sizes and bandwidth
metrics.
Calculate speed over the actually uploaded size, as else it can be
skewed really bad (showing like terabytes per second)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotools/format: add struct to pretty print bytes
Thomas Lamprecht [Thu, 23 Jul 2020 07:36:02 +0000 (09:36 +0200)]
tools/format: add struct to pretty print bytes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agosystemd/time: document CalendarEvent struct and add TODOs
Thomas Lamprecht [Thu, 23 Jul 2020 05:55:38 +0000 (07:55 +0200)]
systemd/time: document CalendarEvent struct and add TODOs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofixed index: chunk_from_offset: avoid slow modulo operation
Thomas Lamprecht [Wed, 22 Jul 2020 15:46:02 +0000 (17:46 +0200)]
fixed index: chunk_from_offset: avoid slow modulo operation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoremove BufferedFixedReader interface
Stefan Reiter [Wed, 22 Jul 2020 13:56:23 +0000 (15:56 +0200)]
remove BufferedFixedReader interface

replaced by AsyncIndexReader

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoimplement AsyncSeek for AsyncIndexReader
Stefan Reiter [Wed, 22 Jul 2020 13:56:22 +0000 (15:56 +0200)]
implement AsyncSeek for AsyncIndexReader

Requires updating the AsyncRead implementation to cope with byte-wise
seeks to intra-chunk positions.

Uses chunk_from_offset to get locations within chunks, but tries to
avoid it for sequential read to not reduce performance from before.

AsyncSeek needs to use the temporary seek_to_pos to avoid changing the
position in case an invalid seek is given and it needs to error in
poll_complete.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoadd and implement chunk_from_offset for IndexFile
Stefan Reiter [Wed, 22 Jul 2020 13:56:21 +0000 (15:56 +0200)]
add and implement chunk_from_offset for IndexFile

Necessary for byte-wise seeking through chunks in an index.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agodatastore/chunker: fix comment typos
Thomas Lamprecht [Wed, 22 Jul 2020 14:12:49 +0000 (16:12 +0200)]
datastore/chunker: fix comment typos

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobackup: list images: handle walkdir error, catch "lost+found"
Thomas Lamprecht [Wed, 22 Jul 2020 14:01:50 +0000 (16:01 +0200)]
backup: list images: handle walkdir error, catch "lost+found"

We support using an ext4 mountpoint directly as datastore and even do
so ourself when creating one through the disk manage code.

Such ext4 ountpoints have a lost+found directory which only root can
traverse into. As the GC list images is done as backup:backup user
walkdir gets an error.

We cannot ignore just all permission errors, as they could lead to
missing some backup indexes and thus possibly sweeping more chunks
than desired. While *normally* that should not happen through our
stack, we had already user report that they do rsyncs to move a
datastore from old to new server and got the permission wrong.

So for now be still very strict, only allow a "lost+found" directory
as immediate child of the datastore base directory, nothing else.

If deemed safe, this can always be made less strict. Possibly by
filtering the known backup-types on the highest level first.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodatastore: fix typo
Thomas Lamprecht [Wed, 22 Jul 2020 13:04:14 +0000 (15:04 +0200)]
datastore: fix typo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix #2871: close FDs when scanning backup group
Fabian Grünbichler [Tue, 21 Jul 2020 13:03:36 +0000 (15:03 +0200)]
fix #2871: close FDs when scanning backup group

otherwise we leak those descriptors and run into EMFILE when a backup
group contains many snapshots.

fcntl::openat and Dir::openat are not the same ;)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agofix #2865: detect and skip vanished snapshots
Fabian Grünbichler [Tue, 21 Jul 2020 13:03:35 +0000 (15:03 +0200)]
fix #2865: detect and skip vanished snapshots

also when they have been removed/forgotten since we retrieved the
snapshot list for the currently syncing backup group.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoapi: translate ENOTFOUND to 404 for downloads
Fabian Grünbichler [Tue, 21 Jul 2020 13:03:34 +0000 (15:03 +0200)]
api: translate ENOTFOUND to 404 for downloads

and percolate the HttpError back up on the client side

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agofix #2860: skip in-progress snapshots when syncing
Fabian Grünbichler [Tue, 21 Jul 2020 13:03:33 +0000 (15:03 +0200)]
fix #2860: skip in-progress snapshots when syncing

they don't have a final manifest yet and are not done, so they can't be
synced either.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years ago.gitignore: add build directory
Fabian Grünbichler [Tue, 21 Jul 2020 13:03:32 +0000 (15:03 +0200)]
.gitignore: add build directory

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: add calendar event selector
Thomas Lamprecht [Tue, 21 Jul 2020 17:32:25 +0000 (19:32 +0200)]
ui: add calendar event selector

modelled after the PVE one, but we are not 1:1 compatible and need
deleteEmpty support. For now let's just have some duplicate code, but
we should try to move this to widget toolkit ASAP.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: sync job: default to false for "remove-vanished"
Thomas Lamprecht [Tue, 21 Jul 2020 16:48:30 +0000 (18:48 +0200)]
ui: sync job: default to false for "remove-vanished"

can be enabled later one easily, and restoring deleted snapshots
isn't easy.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: sync job: group remote fields and use "Source" in labels
Thomas Lamprecht [Tue, 21 Jul 2020 16:46:55 +0000 (18:46 +0200)]
ui: sync job: group remote fields and use "Source" in labels

Using "Source" helps to understand that this is a "pull from remote"
sync, not a "push to remote" one.

https://forum.proxmox.com/threads/suggestions-regarding-configurations-terminology.73272/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agomove subscription API path to /nodes
Stefan Reiter [Tue, 21 Jul 2020 11:41:06 +0000 (13:41 +0200)]
move subscription API path to /nodes

This aligns it with PVE and allows the widget toolkit's update window
"refresh" to work without modifications once POST /apt/update is
implemented.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoparse_calendar_event: support the weekly special expression
Thomas Lamprecht [Tue, 21 Jul 2020 11:24:48 +0000 (13:24 +0200)]
parse_calendar_event: support the weekly special expression

While we do not yet support the date specs for CalendarEvent the left
out "weekly" special expression[0] dies not requires that support.
It is specified to be equivalent with `Mon *-*-* 00:00:00` [0] and
this can be implemented with the weekday and time support we already
have.

[0]: https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi2/status: fix estimation bug
Dominik Csapak [Fri, 17 Jul 2020 13:39:16 +0000 (15:39 +0200)]
api2/status: fix estimation bug

when a datastore has enough data to calculate the estimated full date,
but always has exactly the same usage, the factor b of the regression
is '0'

return 0 for that case so that the gui can show 'never' instead of
'not enough data'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodocs: fix some typos
Thomas Lamprecht [Tue, 21 Jul 2020 11:01:21 +0000 (13:01 +0200)]
docs: fix some typos

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: GC followup
Thomas Lamprecht [Tue, 21 Jul 2020 10:58:47 +0000 (12:58 +0200)]
docs: GC followup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agochunk_store: Fix typo in bail message
Aaron Lauterer [Tue, 21 Jul 2020 09:54:37 +0000 (11:54 +0200)]
chunk_store: Fix typo in bail message

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agobackup: Fix typos and grammar
Aaron Lauterer [Tue, 21 Jul 2020 09:54:36 +0000 (11:54 +0200)]
backup: Fix typos and grammar

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agodocs: fix #2851 Add note about GC grace period
Aaron Lauterer [Tue, 21 Jul 2020 09:54:35 +0000 (11:54 +0200)]
docs: fix #2851 Add note about GC grace period

Adding a note about the garbage collection's grace period due to the
default atime behavior should help to avoid confusion as to why space is
not freed immediately.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agofollowup: fixup the directory number, refactor
Thomas Lamprecht [Mon, 20 Jul 2020 12:39:02 +0000 (14:39 +0200)]
followup: fixup the directory number, refactor

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: add note on supported filesystems
Stoiko Ivanov [Fri, 17 Jul 2020 14:55:17 +0000 (14:55 +0000)]
docs: add note on supported filesystems

certain filesystems cannot be used as chunkstores, because they don't
support 2^16 subdirectories (e.g. ext4 with certain features disabled
or ext3 - see ext4(5))

reported via our community forum:
https://forum.proxmox.com/threads/emlink-too-many-links.73108/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agodocs: introduction: rewording and fixing of minor errors
Dylan Whyte [Fri, 17 Jul 2020 14:25:04 +0000 (16:25 +0200)]
docs: introduction: rewording and fixing of minor errors

Reworded one sentence for improved readability.
Fixed some minor language errors.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agodocs: admin guide: fix grammatical errors and improve English
Dylan Whyte [Fri, 17 Jul 2020 14:24:31 +0000 (16:24 +0200)]
docs: admin guide: fix grammatical errors and improve English

Mostly fixed typos and grammatical errors.
Improved wording in some sections to make instructions/advice clearer.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agobump udev build-dependency
Fabian Grünbichler [Mon, 20 Jul 2020 10:07:45 +0000 (12:07 +0200)]
bump udev build-dependency

0.4 contains a fix for C chars on non-x86 architectures.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobuild: run tests on build (again)
Fabian Grünbichler [Mon, 20 Jul 2020 08:22:13 +0000 (10:22 +0200)]
build: run tests on build (again)

now that all examples and tests are fixed again.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomanifest: revert canonicalization to old behaviour
Fabian Grünbichler [Mon, 20 Jul 2020 08:22:12 +0000 (10:22 +0200)]
manifest: revert canonicalization to old behaviour

JSON keys MUST be quoted. this is a one-time break in signature
validation for backups created with the broken canonicalization code.
QEMU backups are not affected, as libproxmox-backup-qemu never linked
the broken versions.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoexamples/upload-speed: adapt to change
Dominik Csapak [Fri, 17 Jul 2020 13:39:17 +0000 (15:39 +0200)]
examples/upload-speed: adapt to change

commit 323b2f3dd6364119f2ffcd7397161e9f56cdb3fc
changed the signature of upload_speedtest
adapt the example

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotools/xattr: a char from C is not universally a rust i8
Thomas Lamprecht [Sun, 19 Jul 2020 17:42:13 +0000 (19:42 +0200)]
tools/xattr: a char from C is not universally a rust i8

Make it actually do the correct cast by using `libc::c_char`.

Fixes issues when building on other platforms, e.g., the aarch64
client only build on Arch Linux ARM I tested in my free time.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoserver: add path value to NOT_FOUND http error
Thomas Lamprecht [Wed, 15 Jul 2020 07:11:16 +0000 (09:11 +0200)]
server: add path value to NOT_FOUND http error

Especially helpful for requests not coming from browsers (where the
URL is normally easy to find out).

Makes it easier to detect if one triggered a request with an old
client, or so..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump pxar dependency to 0.2.1
Wolfgang Bumiller [Thu, 16 Jul 2020 09:48:22 +0000 (11:48 +0200)]
bump pxar dependency to 0.2.1

Contains a fix for the check for the maximum allowed size of
acl group object entries.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocatalog_shell: add exit command
Dominik Csapak [Wed, 15 Jul 2020 09:40:42 +0000 (11:40 +0200)]
catalog_shell: add exit command

it is nice to have a command to exit from the shell instead of
only allowing ctrl+d or ctrl+c

the api method is just for documentation/help purposes and does nothing
by itself, the real logic is directly in the read loop

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: .pxarexclude: absolute paths and byte based paths
Wolfgang Bumiller [Wed, 15 Jul 2020 09:53:26 +0000 (11:53 +0200)]
pxar: .pxarexclude: absolute paths and byte based paths

Change the .pxarexclude parser to byte based parsing with
`.split(b'\n')` instead of `.lines()`, to not panic on
non-utf8 paths.

Specially deal with absolute paths by prefixing them with
the current directory.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools: add strip_ascii_whitespace for byte slices
Wolfgang Bumiller [Wed, 15 Jul 2020 09:53:19 +0000 (11:53 +0200)]
tools: add strip_ascii_whitespace for byte slices

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocached user info: check_privs: print privilege path in error message
Thomas Lamprecht [Wed, 15 Jul 2020 06:33:22 +0000 (08:33 +0200)]
cached user info: check_privs: print privilege path in error message

As else this is really user unfriendly, and it not printing it has no
advantage. If one doesn't wants to leak resource existence they just
need to *always* check permissions before checking if the requested
resource exists, if that's not done one can leak information also
without getting the path returned (as the system will either print
"resource doesn't exists" or "no permissions" respectively)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobuildsys: fix targets to not run dpkg-buildpackage 4 times
Thomas Lamprecht [Tue, 14 Jul 2020 10:31:17 +0000 (12:31 +0200)]
buildsys: fix targets to not run dpkg-buildpackage 4 times

and add a deb-all target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 0.8.7-2 v0.8.7
Thomas Lamprecht [Tue, 14 Jul 2020 10:05:34 +0000 (12:05 +0200)]
bump version to 0.8.7-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/lintian-overrides: ignore systemd-service-file-refers-to-unusual-wantedby-target
Thomas Lamprecht [Tue, 14 Jul 2020 09:08:34 +0000 (11:08 +0200)]
d/lintian-overrides: ignore systemd-service-file-refers-to-unusual-wantedby-target

proxmox-backup-banner.service needs getty.target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: datastore edit: avoid an extra indentation level
Thomas Lamprecht [Tue, 14 Jul 2020 08:56:19 +0000 (10:56 +0200)]
ui: datastore edit: avoid an extra indentation level

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agowarning fixup
Wolfgang Bumiller [Tue, 14 Jul 2020 08:37:14 +0000 (10:37 +0200)]
warning fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.8.7-1
Wolfgang Bumiller [Tue, 14 Jul 2020 08:18:54 +0000 (10:18 +0200)]
bump version to 0.8.7-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: restore file attributes, improve errors
Wolfgang Bumiller [Tue, 14 Jul 2020 07:16:16 +0000 (09:16 +0200)]
pxar: restore file attributes, improve errors

and use the correct integer types for these operations

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoui: buildsys: add lint target
Thomas Lamprecht [Tue, 14 Jul 2020 05:42:55 +0000 (07:42 +0200)]
ui: buildsys: add lint target

not yet automatically called on build, as it still fails.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: installation: add note where to find the webinterface
Thomas Lamprecht [Tue, 14 Jul 2020 05:30:50 +0000 (07:30 +0200)]
docs: installation: add note where to find the webinterface

As the 8007 vs 8006 port is new and could confuse people, especially
if they did not used the PBS installer.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: fix typo s/PBS_REPOSTOR/PBS_REPOSITOR/
Thomas Lamprecht [Mon, 13 Jul 2020 17:23:48 +0000 (19:23 +0200)]
docs: fix typo s/PBS_REPOSTOR/PBS_REPOSITOR/

Reported-by: Piotr Paszkowski aka patefoniQ
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: running tasks: update limit to 100
Thomas Lamprecht [Sat, 11 Jul 2020 10:53:27 +0000 (12:53 +0200)]
ui: running tasks: update limit to 100

else we'll never see the 99+ tasks ..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: add secure-apt
Thomas Lamprecht [Fri, 10 Jul 2020 12:12:51 +0000 (14:12 +0200)]
docs: add secure-apt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 0.8.6-1 v0.8.6
Thomas Lamprecht [Fri, 10 Jul 2020 09:35:04 +0000 (11:35 +0200)]
bump version to 0.8.6-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agosrc/backup/data_blob_reader.rs: avoid unwrap() - return error instead
Dietmar Maurer [Fri, 10 Jul 2020 09:28:19 +0000 (11:28 +0200)]
src/backup/data_blob_reader.rs: avoid unwrap() - return error instead

3 years agoui: fingerprint: add icon to copy button
Thomas Lamprecht [Fri, 10 Jul 2020 09:17:20 +0000 (11:17 +0200)]
ui: fingerprint: add icon to copy button

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: fingerprint: add copy button
Thomas Lamprecht [Fri, 10 Jul 2020 09:13:54 +0000 (11:13 +0200)]
ui: fingerprint: add copy button

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: add show fingerprint button to dashboard
Dominik Csapak [Fri, 10 Jul 2020 08:51:13 +0000 (10:51 +0200)]
ui: add show fingerprint button to dashboard

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/node/status: add fingerprint
Dominik Csapak [Fri, 10 Jul 2020 08:51:12 +0000 (10:51 +0200)]
api2/node/status: add fingerprint

and rename get_usage to get_status (since its not usage only anymore)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agorefactor CertInfo to tools
Dominik Csapak [Fri, 10 Jul 2020 08:51:11 +0000 (10:51 +0200)]
refactor CertInfo to tools

we want to reuse some of the functionality elsewhere

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoupdate proxmox crate to 0.2.0
Wolfgang Bumiller [Fri, 10 Jul 2020 09:05:19 +0000 (11:05 +0200)]
update proxmox crate to 0.2.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosrc/bin/proxmox_backup_client/catalog.rs: fix keyfile handling
Dietmar Maurer [Fri, 10 Jul 2020 08:36:13 +0000 (10:36 +0200)]
src/bin/proxmox_backup_client/catalog.rs: fix keyfile handling

3 years agosrc/backup/manifest.rs: fix signature (exclude 'signature' property)
Dietmar Maurer [Fri, 10 Jul 2020 08:31:42 +0000 (10:31 +0200)]
src/backup/manifest.rs: fix signature (exclude 'signature' property)

3 years agoclient: show key path when creating/changing default key
Wolfgang Bumiller [Fri, 10 Jul 2020 07:57:55 +0000 (09:57 +0200)]
client: show key path when creating/changing default key

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoclient: add simple version command
Thomas Lamprecht [Fri, 10 Jul 2020 07:34:07 +0000 (09:34 +0200)]
client: add simple version command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoproxmox-backup-client benchmark: improve output format
Dietmar Maurer [Fri, 10 Jul 2020 07:13:08 +0000 (09:13 +0200)]
proxmox-backup-client benchmark: improve output format

3 years agosrc/server/rest.rs: avoid compiler warning
Dietmar Maurer [Fri, 10 Jul 2020 04:56:12 +0000 (06:56 +0200)]
src/server/rest.rs: avoid compiler warning

3 years agoui: running task: increase active limit we show in badge to 99
Thomas Lamprecht [Thu, 9 Jul 2020 19:56:45 +0000 (21:56 +0200)]
ui: running task: increase active limit we show in badge to 99

Two digits fit nicely, and the extra plus for the >99 case doesn't
takes that much space either. So that and the fact that 9 is just
really low makes me bump this to 99 as cut-off value.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tune badge styling a bit
Thomas Lamprecht [Thu, 9 Jul 2020 19:51:24 +0000 (21:51 +0200)]
ui: tune badge styling a bit

the idea is to blend in when no task is running, thus no
background-color there. When tasks are running use the proxmox
branding guideline dark-grey, it isn't used as often so it should
fall into ones eye when changing but it has some use so it doesn't
seems out of place.

Reduce the border radius by a lot, so that it seems similar to the
one our ExtJS theme uses for the buttons outside - the original
border radius seems like it comes from the time where this was
intended to be a floating badge, there it'd make sense but as
integrated button one this seems to fit the style much more.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodocs: reference PDF variant in HTML output
Thomas Lamprecht [Thu, 9 Jul 2020 19:31:32 +0000 (21:31 +0200)]
docs: reference PDF variant in HTML output

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodebian/proxmox-backup-docs.links: fix name and target
Thomas Lamprecht [Thu, 9 Jul 2020 19:23:41 +0000 (21:23 +0200)]
debian/proxmox-backup-docs.links: fix name and target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodatastore: chown base dir on creation
Stoiko Ivanov [Thu, 9 Jul 2020 16:15:28 +0000 (16:15 +0000)]
datastore: chown base dir on creation

When creating a new datastore the basedir is only owned by the backup
user if it did not exist beforehand (create_path chowns only if it
creates the directory), and returns false if it did not create the
directory).

This improves the experience when adding a new datastore on a fresh
disk or existing directory (not owned by backup) - backups/pulls can
be run instead of terminating with EPERM.

Tested on my local testinstall with a new disk, and a existing directory:

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoui: dashboard/TaskSummary: fade icons if count is zero
Dominik Csapak [Thu, 9 Jul 2020 14:11:51 +0000 (16:11 +0200)]
ui: dashboard/TaskSummary: fade icons if count is zero

so that users can see the relevant counts faster

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: fix crypt mode caluclation
Dominik Csapak [Thu, 9 Jul 2020 14:50:24 +0000 (16:50 +0200)]
ui: fix crypt mode caluclation

also include 'mixed' in the calculation of the overall mode of a
snapshot and group

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>