]>
git.proxmox.com Git - proxmox-backup.git/log
Dietmar Maurer [Tue, 23 Jun 2020 06:16:56 +0000 (08:16 +0200)]
cleanup: implement FromStr for BackupGroup
Dietmar Maurer [Tue, 23 Jun 2020 06:09:52 +0000 (08:09 +0200)]
cleanup: implement FromStr for BackupDir
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.
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>
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>
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>
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>
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
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>
Dietmar Maurer [Mon, 22 Jun 2020 08:44:26 +0000 (10:44 +0200)]
debian/postinst: use try-reload-or-restart for both services
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>
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>
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>
Dietmar Maurer [Mon, 22 Jun 2020 07:39:37 +0000 (09:39 +0200)]
try to reload proxmox-backup-proxy on package upgrade
Dietmar Maurer [Sat, 20 Jun 2020 05:24:02 +0000 (07:24 +0200)]
avoid compiler warnings
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.
Dietmar Maurer [Sat, 20 Jun 2020 05:15:32 +0000 (07:15 +0200)]
src/api2/node/disks/zfs.rs: always set pool name
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'
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
Dietmar Maurer [Sat, 20 Jun 2020 04:15:26 +0000 (06:15 +0200)]
fixup for previous commit
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
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().
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Dietmar Maurer [Thu, 18 Jun 2020 17:40:01 +0000 (19:40 +0200)]
parse_zpool_status_field: handle tabs without copying input
Dietmar Maurer [Thu, 18 Jun 2020 16:38:56 +0000 (18:38 +0200)]
parse_zpool_status_vdev: consider tabs as 8 spaces
Dietmar Maurer [Thu, 18 Jun 2020 13:04:46 +0000 (15:04 +0200)]
src/api2/node/disks/zfs.rs: add zpool_details api
Dietmar Maurer [Thu, 18 Jun 2020 12:55:22 +0000 (14:55 +0200)]
src/tools/disks/zpool_status.rs: improve parser
Dietmar Maurer [Thu, 18 Jun 2020 10:57:55 +0000 (12:57 +0200)]
src/tools/nom.rs: new helper parse_complete_line() for single line parsers
Like parse_complete(), but generates simpler error messages.
Dietmar Maurer [Thu, 18 Jun 2020 10:41:13 +0000 (12:41 +0200)]
src/tools/nom.rs: move nom helpers into separate file
Dietmar Maurer [Thu, 18 Jun 2020 08:31:07 +0000 (10:31 +0200)]
src/tools/disks/zpool_list.rs: split code into separate file
Dietmar Maurer [Thu, 18 Jun 2020 08:23:15 +0000 (10:23 +0200)]
src/tools/disks/zpool_status.rs: parse zpool status output
Dietmar Maurer [Wed, 17 Jun 2020 07:08:26 +0000 (09:08 +0200)]
src/tools/disks/zfs.rs: rename ZFSPoolStatus into ZFSPoolInfo, fix error message
Dietmar Maurer [Wed, 17 Jun 2020 06:31:11 +0000 (08:31 +0200)]
src/api2/node/disks/directory.rs: add early check if disk is unused
Dietmar Maurer [Wed, 17 Jun 2020 06:07:54 +0000 (08:07 +0200)]
src/bin/proxmox_backup_manager/disk.rs: add cli to create mounted disks
Dietmar Maurer [Wed, 17 Jun 2020 06:07:42 +0000 (08:07 +0200)]
avoid compiler warning
Dietmar Maurer [Wed, 17 Jun 2020 05:47:11 +0000 (07:47 +0200)]
src/tools/disks/zfs.rs: cleanup parse_pool_header
Dietmar Maurer [Wed, 17 Jun 2020 05:38:19 +0000 (07:38 +0200)]
src/tools/disks/zfs.rs: add more parser tests
Dietmar Maurer [Wed, 17 Jun 2020 05:14:26 +0000 (07:14 +0200)]
src/tools/disks/zfs.rs: add comment
Dietmar Maurer [Wed, 17 Jun 2020 05:00:54 +0000 (07:00 +0200)]
src/tools/disks/zfs.rs: make zfs list parser private
Dietmar Maurer [Tue, 16 Jun 2020 16:14:35 +0000 (18:14 +0200)]
src/tools/disks/zfs.rs: add regression tests for parse_zfs_list
Dietmar Maurer [Tue, 16 Jun 2020 15:51:17 +0000 (17:51 +0200)]
src/tools/disks/zfs.rs: simplify code
Wolfgang Bumiller [Tue, 16 Jun 2020 12:41:28 +0000 (14:41 +0200)]
move api dump binaries back to src/bin for package building
they're required for docs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Tue, 16 Jun 2020 09:13:34 +0000 (11:13 +0200)]
ui: add DiskList and DirectoryList
this also contains an adapted CreateDirectory window
for now this is mostly copied, since refactoring was not that
straightforward (changed parameters, etc.)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Dietmar Maurer [Tue, 16 Jun 2020 11:35:21 +0000 (13:35 +0200)]
src/api2/node/disks.rs: expose directory api
Wolfgang Bumiller [Tue, 16 Jun 2020 11:32:23 +0000 (13:32 +0200)]
move test binaries to examples/
These aren't installed and are only used for manual testing,
so there's no reason to force them to be built all the time.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Tue, 16 Jun 2020 11:24:22 +0000 (13:24 +0200)]
src/api2/node/disks/zfs.rs: add zpool api
Dietmar Maurer [Tue, 16 Jun 2020 11:21:26 +0000 (13:21 +0200)]
src/tools/disks/zfs.rs: cleanup (rename usage properties)
And allow to parse zpool list output without -v flag.
Dietmar Maurer [Tue, 16 Jun 2020 09:47:10 +0000 (11:47 +0200)]
src/tools/disks/zfs.rs: parse more infos (dedup, fragmentation, health)
Dietmar Maurer [Tue, 16 Jun 2020 07:46:06 +0000 (09:46 +0200)]
avoid compiler warnings
Dietmar Maurer [Tue, 16 Jun 2020 05:53:23 +0000 (07:53 +0200)]
use new run_command helper
Wolfgang Bumiller [Tue, 16 Jun 2020 09:25:54 +0000 (11:25 +0200)]
catalog: don't panic on invalid file mtimes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Jun 2020 09:25:31 +0000 (11:25 +0200)]
fix file timestamps in catalog
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Jun 2020 09:04:56 +0000 (11:04 +0200)]
pxar: fix missing subdirectories in catalogs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Jun 2020 08:54:54 +0000 (10:54 +0200)]
reuse some extractor code in catalog shell
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Jun 2020 08:33:14 +0000 (10:33 +0200)]
use O_EXCL when creating files during extraction
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Jun 2020 08:32:13 +0000 (10:32 +0200)]
pxar: make extractor state more reusable
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Jun 2020 07:50:29 +0000 (09:50 +0200)]
AsyncReadChunk: require Send
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Jun 2020 08:37:03 +0000 (10:37 +0200)]
require pxar 0.1.7
fixes some hardlink reading issues in random-accessor
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Mon, 15 Jun 2020 08:38:30 +0000 (10:38 +0200)]
src/tools.rs: add setup_safe_path_env()
Dietmar Maurer [Mon, 15 Jun 2020 08:00:55 +0000 (10:00 +0200)]
src/api2/node/disks/directory.rs: implement add-datastore feature
Wolfgang Bumiller [Mon, 15 Jun 2020 07:19:35 +0000 (09:19 +0200)]
dynamic index: make it hard to mess up endianess
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 12:57:58 +0000 (14:57 +0200)]
remove unnecessary .into
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Fri, 12 Jun 2020 11:34:07 +0000 (13:34 +0200)]
ui: Dashboard: implement subscription panel
and make it nicer
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Fri, 12 Jun 2020 11:34:06 +0000 (13:34 +0200)]
ui: Dashboard: show LongestTask/RunningTask/TaskSummary
by querying the new /status/task api every 15 seconds
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[w.bumiller@proxmox.com: fixup from d.csapak@proxmox.com]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Fri, 12 Jun 2020 11:34:05 +0000 (13:34 +0200)]
ui: add Task Panels for dashboard
LongestTasks:
grid that shows tasks sorted by duration in descending order
RunningTasks:
grid that shows all running tasks
TaskSummary:
an overview of backup,prune,gc and sync tasks (error/warning/ok)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Fri, 12 Jun 2020 11:34:04 +0000 (13:34 +0200)]
ui: css: improve look of fa icons
with these changes fa icons in actioncolumns,
they have the same layout as <i> elements on the same line
(they were slightly bigger and offset before)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Fri, 12 Jun 2020 11:34:03 +0000 (13:34 +0200)]
api2/status: add task list endpoint
for now mostly copy/paste from nodes/nodename/tasks
(without the parameters)
but we should replace the 'read_task_list' with a method
that gives us the tasks since some timestamp
so that we can get a longer list of tasks than for the node
(we could of course embed this then in the nodes/node/task api call and
remove this again as long as the api is not stable)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Fri, 12 Jun 2020 11:34:02 +0000 (13:34 +0200)]
implement From<TaskListInfo> for TaskListItem
and use it where its convenient
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 11:57:56 +0000 (13:57 +0200)]
use new Mmap helper for dynamic index
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 11:57:35 +0000 (13:57 +0200)]
bump proxmox dep to 0.1.40
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 09:46:42 +0000 (11:46 +0200)]
some internal combinator-influenced api cleanup
The download methods used to take the destination by value
and return them again, since this was required when using
combinators before we had `async fn`.
But this is just an ugly left-over now.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 09:40:18 +0000 (11:40 +0200)]
client: make dump_image async, use async chunk reader
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 09:38:21 +0000 (11:38 +0200)]
add an AsyncReadChunk trait
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 09:01:04 +0000 (11:01 +0200)]
more cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 08:59:34 +0000 (10:59 +0200)]
cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 08:51:36 +0000 (10:51 +0200)]
pxar, acl: cleanup acl helper usage
use NixPath for Acl::set_file to avoid memduping the c
string
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Fri, 12 Jun 2020 08:04:59 +0000 (10:04 +0200)]
client: only start catalog upload if we have one
else we start a dynamic writer and never close it, leading to a backup error
this fixes an issue with backing up vm templates
(and possibly vms without disks)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Wed, 10 Jun 2020 12:57:39 +0000 (14:57 +0200)]
BackupEnvironment: do not set finished flag prematurely
we check if all dynamic_writers are closed and if the backup contains
any valid files, we can only mark the backup finished after those
checks, else the backup task gets marked as OK, even though it
is not finished and no cleanups run
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 12 Jun 2020 08:36:57 +0000 (10:36 +0200)]
pxar: fcaps in fuse
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Wed, 10 Jun 2020 10:02:58 +0000 (12:02 +0200)]
api2/status: use new rrd::extract_cached_data
and drop the now unused extract_lists function
this also fixes a bug, where we did not add the datastore to the list at
all when there was no rrd data
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Wed, 10 Jun 2020 10:02:57 +0000 (12:02 +0200)]
rrd: move creation of serde value into api
there is now a 'extract_cached_data' which just returns
the data of the specified field, and an api function that converts
a list of fields to the correct serde value
this way we do not have to create a serde value in rrd/cache.rs
(makes for a better interface)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Wed, 10 Jun 2020 10:02:56 +0000 (12:02 +0200)]
refactor time functions to tools
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 10 Jun 2020 10:22:18 +0000 (12:22 +0200)]
pxar: support .pxareclude files, error report updates
Report vanished files (instead of erroring out on them),
also only warn about files inaccessible due to permissions
instead of bailing out.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 10 Jun 2020 09:09:23 +0000 (11:09 +0200)]
downgrade some FIXMEs to TODOs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 10 Jun 2020 09:03:42 +0000 (11:03 +0200)]
turn pxar::flags into bitflags, pxar::Flags
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Wed, 10 Jun 2020 09:02:37 +0000 (11:02 +0200)]
add api to format disks and create datastores