]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agosrc/bin/proxmox_backup_client/mount.rs: split out mount code
Dietmar Maurer [Thu, 2 Jul 2020 15:49:08 +0000 (17:49 +0200)]
src/bin/proxmox_backup_client/mount.rs: split out mount code

3 years agoui: consistently spell Datastore without space between words
Thomas Lamprecht [Thu, 2 Jul 2020 15:20:38 +0000 (17:20 +0200)]
ui: consistently spell Datastore without space between words

Not even hard feeling on 'Datastore' vs. 'Data Store' but consistency
is desired in such names.
Talked shortly with Dominik, which also slightly favored the one
without space - so just go for that one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: disk create: sync and improve 'add-datastore' checkbox label
Thomas Lamprecht [Thu, 2 Jul 2020 15:05:58 +0000 (17:05 +0200)]
ui: disk create: sync and improve 'add-datastore' checkbox label

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoproxmox-backup-client: add benchmark command
Dietmar Maurer [Thu, 2 Jul 2020 12:00:32 +0000 (14:00 +0200)]
proxmox-backup-client: add benchmark command

This is just a start, We need to add more useful things here...

3 years agopxar: fixup 'vanished-file' logic a bit
Wolfgang Bumiller [Tue, 30 Jun 2020 12:41:42 +0000 (14:41 +0200)]
pxar: fixup 'vanished-file' logic a bit

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: fix missing newlines in warnings
Wolfgang Bumiller [Tue, 30 Jun 2020 12:37:20 +0000 (14:37 +0200)]
pxar: fix missing newlines in warnings

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoDataStoreConfig.js: add verify button
Dietmar Maurer [Tue, 30 Jun 2020 11:28:42 +0000 (13:28 +0200)]
DataStoreConfig.js: add verify button

3 years agoDataStoreContent.js: add verify button
Dietmar Maurer [Tue, 30 Jun 2020 11:22:02 +0000 (13:22 +0200)]
DataStoreContent.js: add verify button

3 years agosrc/api2/admin/datastore.rs: avoid slash in UPID strings
Dietmar Maurer [Tue, 30 Jun 2020 11:11:22 +0000 (13:11 +0200)]
src/api2/admin/datastore.rs: avoid slash in UPID strings

3 years agobump version to 0.5.0-1 v0.5.0
Dietmar Maurer [Mon, 29 Jun 2020 11:01:11 +0000 (13:01 +0200)]
bump version to 0.5.0-1

3 years agofix typo
Dietmar Maurer [Mon, 29 Jun 2020 10:59:25 +0000 (12:59 +0200)]
fix typo

3 years agopartially revert commit 1f82f9b7b5d231da22a541432d5617cb303c0000
Dietmar Maurer [Mon, 29 Jun 2020 10:44:45 +0000 (12:44 +0200)]
partially revert commit 1f82f9b7b5d231da22a541432d5617cb303c0000

do it backwards compatible. Also, code was wrong because FixedIndexWriter
still computed old style csums...

3 years agoui: allow to Forget (delete) backup snapshots.
Dietmar Maurer [Fri, 26 Jun 2020 13:58:06 +0000 (15:58 +0200)]
ui: allow to Forget (delete) backup snapshots.

3 years agopxar: deal with files changing size during archiving
Wolfgang Bumiller [Fri, 26 Jun 2020 09:49:51 +0000 (11:49 +0200)]
pxar: deal with files changing size during archiving

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.4.0-1 v0.4.0
Dietmar Maurer [Fri, 26 Jun 2020 08:43:52 +0000 (10:43 +0200)]
bump version to 0.4.0-1

3 years agodepend on proxmox 0.1.41
Dietmar Maurer [Fri, 26 Jun 2020 08:40:47 +0000 (10:40 +0200)]
depend on proxmox 0.1.41

3 years agoui: add ZFS management
Dominik Csapak [Thu, 25 Jun 2020 12:53:05 +0000 (14:53 +0200)]
ui: add ZFS management

adds a ZFSList and ZFSCreate class, modeled after the one in pve

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofix test output
Dominik Csapak [Thu, 25 Jun 2020 12:53:00 +0000 (14:53 +0200)]
fix test output

field separator for pools is always a tab when using -H

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosrc/backup/verify.rs: do not stop on server shutdown
Dietmar Maurer [Fri, 26 Jun 2020 07:45:59 +0000 (09:45 +0200)]
src/backup/verify.rs: do not stop on server shutdown

This is a read-only task, so there is no need to stop.

3 years agoWorkerTask: add warnings and count them
Dominik Csapak [Wed, 24 Jun 2020 07:04:35 +0000 (09:04 +0200)]
WorkerTask: add warnings and count them

so that we have one level more between errors and OK

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: dashboard: remove 'wobbling' of tasks that have the same duration
Dominik Csapak [Thu, 25 Jun 2020 08:45:52 +0000 (10:45 +0200)]
ui: dashboard: remove 'wobbling' of tasks that have the same duration

by sorting them by upid after sorting by duration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: dashboard: use last value for holes in history graph
Dominik Csapak [Thu, 25 Jun 2020 08:45:51 +0000 (10:45 +0200)]
ui: dashboard: use last value for holes in history graph

it is only designed to be a quick overview, so having holes there
is not really pretty and since we do not even show any date
for the points, we can simply reuse the last value for holes

the 'real' graph with holes is still available on the
DataStoreStatistics panel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofix typo
Dominik Csapak [Thu, 25 Jun 2020 08:45:50 +0000 (10:45 +0200)]
fix typo

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoimprove 'debug' parameter
Dominik Csapak [Thu, 25 Jun 2020 08:45:49 +0000 (10:45 +0200)]
improve 'debug' parameter

instead of checking on '1' or 'true', check that it is there and not
'0' and 'false'. this allows using simply

https://foo:8007/?debug

instead of

https://foo:8007/?debug=1

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: automatically add 'localhost' as nodename for all panels
Dominik Csapak [Thu, 25 Jun 2020 08:45:48 +0000 (10:45 +0200)]
ui: automatically add 'localhost' as nodename for all panels

this will make refactoring easier for panels that are reused from pve
(where we always have a hostname)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: show proper loadMask for DataStoreContent
Dominik Csapak [Thu, 25 Jun 2020 08:45:47 +0000 (10:45 +0200)]
ui: show proper loadMask for DataStoreContent

we have to use the correct store, and we have to manually show the
error (since monStoreErrors only works for Proxmox Proxies)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosrc/backup/index.rs: add compute_csum
Dietmar Maurer [Fri, 26 Jun 2020 07:00:34 +0000 (09:00 +0200)]
src/backup/index.rs: add compute_csum

And use it for fixed and dynamic index. Please note that this
changes checksums for fixed indexes, so restore older backups
will fails now (not backward compatible).

3 years agoexamples/upload-speed.rs: fix compile error
Dietmar Maurer [Fri, 26 Jun 2020 06:59:51 +0000 (08:59 +0200)]
examples/upload-speed.rs: fix compile error

3 years agosrc/api2/backup.rs: call register_chunk in previous download api
Dietmar Maurer [Fri, 26 Jun 2020 06:22:46 +0000 (08:22 +0200)]
src/api2/backup.rs: call register_chunk in previous download api

3 years agosrc/backup/index.rs: add chunk_info method
Dietmar Maurer [Fri, 26 Jun 2020 06:14:45 +0000 (08:14 +0200)]
src/backup/index.rs: add chunk_info method

3 years agoupdate backup api for incremental backup
Dietmar Maurer [Thu, 25 Jun 2020 10:23:30 +0000 (12:23 +0200)]
update backup api for incremental backup

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoallow to abort verify jobs
Dietmar Maurer [Thu, 25 Jun 2020 10:55:34 +0000 (12:55 +0200)]
allow to abort verify jobs

And improve job description rendering on gui.

3 years agoui: file browser: expand child node if only one archive present
Thomas Lamprecht [Thu, 25 Jun 2020 09:54:46 +0000 (11:54 +0200)]
ui: file browser: expand child node if only one archive present

Get the first visible node through the Ext.data.NodeInterface defined
"firstChild" element and expand that if there's only one archive
present.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: file browser: adapt height for 4:3 instead of weird 2:1 ratio
Thomas Lamprecht [Thu, 25 Jun 2020 09:54:22 +0000 (11:54 +0200)]
ui: file browser: adapt height for 4:3 instead of weird 2:1 ratio

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoextract create_download_response API helper
Stefan Reiter [Wed, 24 Jun 2020 13:27:40 +0000 (15:27 +0200)]
extract create_download_response API helper

and put it into a new "api2::helpers" module.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years ago[chore] bump to using pxar 0.2.0
Wolfgang Bumiller [Thu, 25 Jun 2020 07:46:24 +0000 (09:46 +0200)]
[chore] bump to using pxar 0.2.0

This breaks all previously created pxar archives!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosrc/bin/proxmox-backup-manager.rs: implement verify
Dietmar Maurer [Wed, 24 Jun 2020 11:34:45 +0000 (13:34 +0200)]
src/bin/proxmox-backup-manager.rs: implement verify

3 years agosrc/api2/admin/datastore.rs: add verify api
Dietmar Maurer [Wed, 24 Jun 2020 11:11:45 +0000 (13:11 +0200)]
src/api2/admin/datastore.rs: add verify api

3 years agosrc/backup/backup_info.rs: impl Display for BackupGroup
Dietmar Maurer [Wed, 24 Jun 2020 10:25:45 +0000 (12:25 +0200)]
src/backup/backup_info.rs: impl Display for BackupGroup

3 years agoupdate to pxar 0.1.9, update ReadAt implementations
Wolfgang Bumiller [Wed, 24 Jun 2020 09:57:12 +0000 (11:57 +0200)]
update to pxar 0.1.9, update ReadAt implementations

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.3.0-1 v0.3.0
Dietmar Maurer [Wed, 24 Jun 2020 08:13:56 +0000 (10:13 +0200)]
bump version to 0.3.0-1

3 years agoadd incremental backup support
Stefan Reiter [Tue, 23 Jun 2020 12:43:10 +0000 (14:43 +0200)]
add incremental backup support

To support incremental backups (where not all chunks are sent to the
server), a new parameter "reuse-csum" is introduced on the
"create_fixed_index" API call. When set and equal to last backups'
checksum, the backup writer clones the data from the last index of this
archive file, and only updates chunks it actually receives.

In incremental mode some checks usually done on closing an index cannot
be made, since they would be inaccurate.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoremove debug println
Dietmar Maurer [Wed, 24 Jun 2020 07:15:13 +0000 (09:15 +0200)]
remove debug println

3 years agofix overflow panic during upload
Stefan Reiter [Tue, 23 Jun 2020 12:43:09 +0000 (14:43 +0200)]
fix overflow panic during upload

if *only* data chunks are registered (high chance during incremental
backup), then chunk_count might be one lower then upload_stat.count
because of the zero chunk being unconditionally uploaded but not used.
Thus when subtracting the two, an overflow would occur.

In general, don't let the client make the server panic, instead just set
duplicates to 0.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoapi2/node/disks/zfs: check if default zfs mount path exists
Dominik Csapak [Tue, 23 Jun 2020 14:00:12 +0000 (16:00 +0200)]
api2/node/disks/zfs: check if default zfs mount path exists

and if it does bail, because otherwise we would get an
error on mounting and have a zpool that is not imported
and disks that are used

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: fix missing deleteEmpty on SyncJobEdit
Dominik Csapak [Tue, 23 Jun 2020 13:29:57 +0000 (15:29 +0200)]
ui: fix missing deleteEmpty on SyncJobEdit

else we cannot delete those fields

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: add pxar FileBrowser
Dominik Csapak [Tue, 23 Jun 2020 10:09:54 +0000 (12:09 +0200)]
ui: add pxar FileBrowser

for unencrypted backups, enables browsing the pxar archives and
downloading single files from it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/admin/datastore: add pxar-file-download api call
Dominik Csapak [Tue, 23 Jun 2020 10:09:53 +0000 (12:09 +0200)]
api2/admin/datastore: add pxar-file-download api call

streams a file from a pxar file of an unencrypted backup

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/admin/datastore: add 'catalog' api call
Dominik Csapak [Tue, 23 Jun 2020 10:09:52 +0000 (12:09 +0200)]
api2/admin/datastore: add 'catalog' api call

returns the dir listing of the given filepath of the backup snapshot
the filepath has to be base64 encoded or 'root'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd From<&DirEntryAttribute to CatalogEntryType and make it pub(crate)
Dominik Csapak [Tue, 23 Jun 2020 10:09:51 +0000 (12:09 +0200)]
add From<&DirEntryAttribute to CatalogEntryType and make it pub(crate)

we want to get a string representation of the DirEntryAttribute
like 'f' for file, etc. and since we have such a mapping already
in the CatalogEntryType, use that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoderive Clone for the LocalChunkReader
Dominik Csapak [Tue, 23 Jun 2020 10:09:50 +0000 (12:09 +0200)]
derive Clone for the LocalChunkReader

this will be necessary for accessing local pxar behind didx files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd LocalDynamicReadAt
Dominik Csapak [Tue, 23 Jun 2020 10:09:49 +0000 (12:09 +0200)]
add LocalDynamicReadAt

mostly copied from BufferedDynamicReadAt from proxmox-backup-client
but the reader is wrapped in an Arc in addition to the Mutex

we will use this for local access to a pxar behind a didx file

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: add BackupFileDownloader
Dominik Csapak [Tue, 23 Jun 2020 10:09:48 +0000 (12:09 +0200)]
ui: add BackupFileDownloader

enables to be able to download whole files from the backup (e.g.
the decoded didx/fidx/blobs) for unencrypted backups

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: fix sorting of backup snapshots
Dominik Csapak [Tue, 23 Jun 2020 10:09:47 +0000 (12:09 +0200)]
ui: fix sorting of backup snapshots

we have to sort the treestore not the original store where we get the data

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: fix encrypted column
Dominik Csapak [Tue, 23 Jun 2020 10:09:46 +0000 (12:09 +0200)]
ui: fix encrypted column

do not use two different gettexts for groups and single backups
and correct logic for backup groups

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosrc/backup/datastore.rs: add new helpers to load blobs and verify chunks
Dietmar Maurer [Wed, 24 Jun 2020 04:58:14 +0000 (06:58 +0200)]
src/backup/datastore.rs: add new helpers to load blobs and verify chunks

3 years agosrc/backup/data_blob.rs: cleanup - improve code reuse
Dietmar Maurer [Wed, 24 Jun 2020 04:56:48 +0000 (06:56 +0200)]
src/backup/data_blob.rs: cleanup - improve code reuse

3 years agosrc/backup/chunk_store.rs: allow to read name()
Dietmar Maurer [Wed, 24 Jun 2020 04:54:21 +0000 (06:54 +0200)]
src/backup/chunk_store.rs: allow to read name()

This is helpful for logging ...

3 years agoui: fix undefined data for iodelay
Dominik Csapak [Tue, 23 Jun 2020 08:30:15 +0000 (10:30 +0200)]
ui: fix undefined data for iodelay

if ios are 0 and io_ticks are defined, the io_delay is zero

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotests/prune.rs: fix compile error
Dietmar Maurer [Tue, 23 Jun 2020 09:32:38 +0000 (11:32 +0200)]
tests/prune.rs: fix compile error

3 years agocleanup: implement FromStr for BackupGroup
Dietmar Maurer [Tue, 23 Jun 2020 06:16:56 +0000 (08:16 +0200)]
cleanup: implement FromStr for BackupGroup

3 years agocleanup: implement FromStr for BackupDir
Dietmar Maurer [Tue, 23 Jun 2020 06:09:52 +0000 (08:09 +0200)]
cleanup: implement FromStr for BackupDir

3 years agosrc/bin/proxmox_backup_manager/disk.rs: add renderer for wearout
Dietmar Maurer [Tue, 23 Jun 2020 05:44:09 +0000 (07:44 +0200)]
src/bin/proxmox_backup_manager/disk.rs: add renderer for wearout

So that we display the same value as the GUI.

3 years agoremove absolute paths when executing binaries
Dominik Csapak [Mon, 15 Jun 2020 09:16:11 +0000 (11:16 +0200)]
remove absolute paths when executing binaries

we set the paths manually, so this is ok

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoremove debug prints
Dominik Csapak [Mon, 22 Jun 2020 14:44:15 +0000 (16:44 +0200)]
remove debug prints

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoremove tokio:main from download-speed example
Dominik Csapak [Mon, 22 Jun 2020 14:44:14 +0000 (16:44 +0200)]
remove tokio:main from download-speed example

we use proxmox_backup::tools::runtime::main already

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd AsyncReaderStream
Dominik Csapak [Mon, 22 Jun 2020 14:44:13 +0000 (16:44 +0200)]
add AsyncReaderStream

and replace AsyncIndexReader's stream implementation with that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosrc/tools/daemon.rs: reopen STDOUT/STDERR journald streams to get correct PID in...
Dietmar Maurer [Mon, 22 Jun 2020 11:06:11 +0000 (13:06 +0200)]
src/tools/daemon.rs: reopen STDOUT/STDERR journald streams to get correct PID in logs

3 years agobump pxar dep to 0.1.8
Wolfgang Bumiller [Mon, 22 Jun 2020 09:10:15 +0000 (11:10 +0200)]
bump pxar dep to 0.1.8

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodebian/postinst: use try-reload-or-restart for both services
Dietmar Maurer [Mon, 22 Jun 2020 08:44:26 +0000 (10:44 +0200)]
debian/postinst: use try-reload-or-restart for both services

3 years agotools::daemon: sync with child after MainPid message
Wolfgang Bumiller [Mon, 22 Jun 2020 08:58:04 +0000 (10:58 +0200)]
tools::daemon: sync with child after MainPid message

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools: add socketpair helper
Wolfgang Bumiller [Mon, 22 Jun 2020 08:49:56 +0000 (10:49 +0200)]
tools: add socketpair helper

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools::daemon: fetch exe name in the beginning
Wolfgang Bumiller [Mon, 22 Jun 2020 08:20:51 +0000 (10:20 +0200)]
tools::daemon: fetch exe name in the beginning

We get the path to our executable via a readlink() on
"/proc/self/exe", which appends a " (deleted)" during
package reloads.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotry to reload proxmox-backup-proxy on package upgrade
Dietmar Maurer [Mon, 22 Jun 2020 07:39:37 +0000 (09:39 +0200)]
try to reload proxmox-backup-proxy on package upgrade

3 years agoavoid compiler warnings
Dietmar Maurer [Sat, 20 Jun 2020 05:24:02 +0000 (07:24 +0200)]
avoid compiler warnings

3 years agozpool_status.rs - indented_list_to_tree: do not set name property
Dietmar Maurer [Sat, 20 Jun 2020 05:19:25 +0000 (07:19 +0200)]
zpool_status.rs - indented_list_to_tree: do not set name property

This is no necessary. We only touch/set 'children' and 'leaf' properties.

3 years agosrc/api2/node/disks/zfs.rs: always set pool name
Dietmar Maurer [Sat, 20 Jun 2020 05:15:32 +0000 (07:15 +0200)]
src/api2/node/disks/zfs.rs: always set pool name

3 years agosrc/tools/disks/zpool_status.rs: add 'leaf' attribute to root node, rename 'prev...
Dietmar Maurer [Sat, 20 Jun 2020 04:49:06 +0000 (06:49 +0200)]
src/tools/disks/zpool_status.rs: add 'leaf' attribute to root node, rename 'prev' into 'parent'

3 years agosrc/tools/disks/zpool_status.rs: move use clause top of file
Dietmar Maurer [Sat, 20 Jun 2020 04:17:22 +0000 (06:17 +0200)]
src/tools/disks/zpool_status.rs: move use clause top of file

3 years agofixup for previous commit
Dietmar Maurer [Sat, 20 Jun 2020 04:15:26 +0000 (06:15 +0200)]
fixup for previous commit

3 years ago src/tools/disks/zpool_status.rs - cleanup: use struct StackItem instead of tuple
Dietmar Maurer [Fri, 19 Jun 2020 16:47:29 +0000 (18:47 +0200)]
 src/tools/disks/zpool_status.rs - cleanup: use struct StackItem instead of tuple

3 years agosrc/tools/disks/zpool_status.rs: remove unnecessary checks
Dietmar Maurer [Fri, 19 Jun 2020 16:27:39 +0000 (18:27 +0200)]
src/tools/disks/zpool_status.rs: remove unnecessary checks

Thos things can never happen, so simply use unwrap().

3 years agosrc/tools/disks/zpool_status.rs: simplify code by using serde_json::to_value
Dietmar Maurer [Fri, 19 Jun 2020 15:51:13 +0000 (17:51 +0200)]
src/tools/disks/zpool_status.rs: simplify code by using serde_json::to_value

3 years agosrc/tools/disks/zpool_status.rs - add all attributes to the tree
Dietmar Maurer [Fri, 19 Jun 2020 14:55:28 +0000 (16:55 +0200)]
src/tools/disks/zpool_status.rs - add all attributes to the tree

3 years agoadd general indented_list_to_tree implementation
Wolfgang Bumiller [Fri, 19 Jun 2020 12:37:40 +0000 (14:37 +0200)]
add general indented_list_to_tree implementation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agolru_cache: restrict and annotate Send impl
Wolfgang Bumiller [Wed, 17 Jun 2020 11:44:21 +0000 (13:44 +0200)]
lru_cache: restrict and annotate Send impl

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi2/admin/datastore: add download-decoded endpoint
Dominik Csapak [Thu, 18 Jun 2020 11:55:29 +0000 (13:55 +0200)]
api2/admin/datastore: add download-decoded endpoint

similar to 'download', but streams the decoded file
when it is not encrypted

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoimpl Sync for DataBlobReader
Dominik Csapak [Thu, 18 Jun 2020 11:55:28 +0000 (13:55 +0200)]
impl Sync for DataBlobReader

this is safe for the reason explained in the comment

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd AsyncIndexReader
Dominik Csapak [Thu, 18 Jun 2020 11:55:27 +0000 (13:55 +0200)]
add AsyncIndexReader

implements AsyncRead as well as Stream for an IndexFile and a store
that implements AsyncReadChunk

we can use this to asyncread or stream the content of a FixedIndex or
DynamicIndex

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd Display trait to BackupDir
Dominik Csapak [Fri, 19 Jun 2020 06:05:09 +0000 (08:05 +0200)]
add Display trait to BackupDir

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoimplement AsyncReadChunk for LocalChunkReader
Dominik Csapak [Thu, 18 Jun 2020 11:55:26 +0000 (13:55 +0200)]
implement AsyncReadChunk for LocalChunkReader

same as the sync ReadChunk but uses tokio::fs::read instead
of file_get_contents

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: add encryption info to snapshot list
Dominik Csapak [Thu, 18 Jun 2020 11:55:25 +0000 (13:55 +0200)]
ui: add encryption info to snapshot list

show which backups/files are encrypted in the snapshot list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/admin/datastore/snapshos: show encrypted and size info per file
Dominik Csapak [Thu, 18 Jun 2020 11:55:24 +0000 (13:55 +0200)]
api2/admin/datastore/snapshos: show encrypted and size info per file

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd encrypted info to Manifest
Dominik Csapak [Thu, 18 Jun 2020 11:55:23 +0000 (13:55 +0200)]
add encrypted info to Manifest

we want to save if a file of a backup is encrypted, so that we can
* show that info on the gui
* can later decide if we need to decrypt the backup

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agouse the existing async method for read_raw_chunk
Dominik Csapak [Thu, 18 Jun 2020 11:55:22 +0000 (13:55 +0200)]
use the existing async method for read_raw_chunk

does the same, except the manual drop, but thats handled there by
letting the value go out of scope

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/admin/datastore: log stream error during file download
Dominik Csapak [Thu, 18 Jun 2020 11:55:20 +0000 (13:55 +0200)]
api2/admin/datastore: log stream error during file download

the client cannot get an error during an chunked http transfer, so at
least log it server side

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoremove unsafe copy code
Dominik Csapak [Thu, 18 Jun 2020 11:55:19 +0000 (13:55 +0200)]
remove unsafe copy code

copy_nonoverlapping is basically a memcpy which can also be done
via copy_from_slice which is not unsafe
(copy_from_slice uses copy_nonoverlapping internally)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoparse_zpool_status_field: handle tabs without copying input
Dietmar Maurer [Thu, 18 Jun 2020 17:40:01 +0000 (19:40 +0200)]
parse_zpool_status_field: handle tabs without copying input

3 years agoparse_zpool_status_vdev: consider tabs as 8 spaces
Dietmar Maurer [Thu, 18 Jun 2020 16:38:56 +0000 (18:38 +0200)]
parse_zpool_status_vdev: consider tabs as 8 spaces

3 years agosrc/api2/node/disks/zfs.rs: add zpool_details api
Dietmar Maurer [Thu, 18 Jun 2020 13:04:46 +0000 (15:04 +0200)]
src/api2/node/disks/zfs.rs: add zpool_details api