]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agoclient: only start catalog upload if we have one
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>
3 years agoBackupEnvironment: do not set finished flag prematurely
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>
3 years agopxar: fcaps in fuse
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>
3 years agoapi2/status: use new rrd::extract_cached_data
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>
3 years agorrd: move creation of serde value into api
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>
3 years agorefactor time functions to tools
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>
3 years agopxar: support .pxareclude files, error report updates
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>
3 years agodowngrade some FIXMEs to TODOs
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>
3 years agoturn pxar::flags into bitflags, pxar::Flags
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>
3 years agoadd api to format disks and create datastores
Dietmar Maurer [Wed, 10 Jun 2020 09:02:37 +0000 (11:02 +0200)]
add api to format disks and create datastores

3 years agocatalog: remove unused SenderWriter
Wolfgang Bumiller [Wed, 10 Jun 2020 08:42:24 +0000 (10:42 +0200)]
catalog: remove unused SenderWriter

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosrc/tools/systemd.rs: implement daemon_reload, start_unit, stop_unit and enable_unit
Dietmar Maurer [Wed, 10 Jun 2020 06:54:41 +0000 (08:54 +0200)]
src/tools/systemd.rs: implement daemon_reload, start_unit, stop_unit and enable_unit

3 years agopxar: don't skip list+found by default
Wolfgang Bumiller [Wed, 10 Jun 2020 06:53:09 +0000 (08:53 +0200)]
pxar: don't skip list+found by default

This used to be default-off and was accidentally set to
on-by-default with the pxar crate update.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: sort .pxareclude-cli file and fix its mode
Wolfgang Bumiller [Wed, 10 Jun 2020 06:49:14 +0000 (08:49 +0200)]
pxar: sort .pxareclude-cli file and fix its mode

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosrc/tools.rs: add new run_command helper
Dietmar Maurer [Wed, 10 Jun 2020 05:16:47 +0000 (07:16 +0200)]
src/tools.rs: add new run_command helper

3 years agosrc/tools/systemd/types.rs: add Mount config
Dietmar Maurer [Tue, 9 Jun 2020 16:46:27 +0000 (18:46 +0200)]
src/tools/systemd/types.rs: add Mount config

3 years agostatistics: covariance(): avoid allocation
Wolfgang Bumiller [Tue, 9 Jun 2020 11:57:24 +0000 (13:57 +0200)]
statistics: covariance(): avoid allocation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agopxar: create .pxarexclude-cli file
Wolfgang Bumiller [Tue, 9 Jun 2020 11:17:55 +0000 (13:17 +0200)]
pxar: create .pxarexclude-cli file

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoui: add datastore usages to dashboard
Dominik Csapak [Tue, 9 Jun 2020 08:01:14 +0000 (10:01 +0200)]
ui: add datastore usages to dashboard

shows an overview over the datastores, including a small chart of the
past month and an estimation of when its full

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2: add status/datastore-usages api call
Dominik Csapak [Tue, 9 Jun 2020 08:01:13 +0000 (10:01 +0200)]
api2: add status/datastore-usages api call

returns a list of the datastores and their usages, a list of usages of
the past month (for the gui) and an estimation of when its full
(using the linear regression)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd statistics module
Dominik Csapak [Tue, 9 Jun 2020 08:01:12 +0000 (10:01 +0200)]
add statistics module

provides some basic statistics functions (sum, mean, etc.)
and a function to return the parameters of the linear regression of
two variables

implemented using num_traits to be more flexible for the types

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agorrd: add 'extract_lists'
Dominik Csapak [Tue, 9 Jun 2020 08:01:11 +0000 (10:01 +0200)]
rrd: add 'extract_lists'

this is an interface to simply get the Vec<Option<f64>> out of rrd
without going through serde values

we return a list of timestamps and a HashMap with the lists we could find
(otherwise it is not in the map)

if no lists could be extracted, the time list is also empty

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: show root disk usage
Dominik Csapak [Tue, 9 Jun 2020 08:01:10 +0000 (10:01 +0200)]
ui: show root disk usage

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agolet disk_usage return StorageStatus and use it for datastores/nodes
Dominik Csapak [Tue, 9 Jun 2020 08:01:09 +0000 (10:01 +0200)]
let disk_usage return StorageStatus and use it for datastores/nodes

disk_usage returned the same values as defined in StorageStatus,
so simply use that

with that we can replace the logic of the datastore status with that
function and also use it for root disk usage of the nodes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosrc/tools/systemd.rs: implement escape_unit and unescape_unit
Dietmar Maurer [Tue, 9 Jun 2020 09:52:06 +0000 (11:52 +0200)]
src/tools/systemd.rs: implement escape_unit and unescape_unit

3 years agoCargo.toml: readd commented-out proxmox crate via path for convenience
Wolfgang Bumiller [Tue, 9 Jun 2020 09:16:28 +0000 (11:16 +0200)]
Cargo.toml: readd commented-out proxmox crate via path for convenience

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomove src/pxar.rs -> src/pxar/mod.rs
Wolfgang Bumiller [Tue, 9 Jun 2020 08:49:43 +0000 (10:49 +0200)]
move src/pxar.rs -> src/pxar/mod.rs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosrc/tools/disks.rs: add create_single_linux_partition and create_file_system
Dietmar Maurer [Mon, 8 Jun 2020 15:37:00 +0000 (17:37 +0200)]
src/tools/disks.rs: add create_single_linux_partition and create_file_system

3 years agocleanup comment
Dietmar Maurer [Mon, 8 Jun 2020 15:27:13 +0000 (17:27 +0200)]
cleanup comment

3 years agosrc/tools/disks.rs: add get_fs_uuid helper
Dietmar Maurer [Mon, 8 Jun 2020 15:26:23 +0000 (17:26 +0200)]
src/tools/disks.rs: add get_fs_uuid helper

3 years agosrc/tools/disks.rs: add helper to list partitions
Dietmar Maurer [Mon, 8 Jun 2020 10:17:15 +0000 (12:17 +0200)]
src/tools/disks.rs: add helper to list partitions

3 years agosrc/tools/disks.rs: make helpers pub
Dietmar Maurer [Mon, 8 Jun 2020 09:19:55 +0000 (11:19 +0200)]
src/tools/disks.rs: make helpers pub

So that I can use them with my test code.

3 years agopxar: split assert_relative_path
Wolfgang Bumiller [Mon, 8 Jun 2020 13:02:52 +0000 (15:02 +0200)]
pxar: split assert_relative_path

the check for a single component is only required in the dir
stack atm

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoswitch to external pxar and fuse crates
Wolfgang Bumiller [Mon, 23 Mar 2020 14:03:18 +0000 (15:03 +0100)]
switch to external pxar and fuse crates

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoCargo.toml: pathpatterns, pxar, proxmox-fuse
Wolfgang Bumiller [Thu, 23 Apr 2020 10:26:14 +0000 (12:26 +0200)]
Cargo.toml: pathpatterns, pxar, proxmox-fuse

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoxattr: make xattr_name_fcaps public
Wolfgang Bumiller [Fri, 24 Apr 2020 09:28:03 +0000 (11:28 +0200)]
xattr: make xattr_name_fcaps public

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotools: add file_get_non_comment_lines
Wolfgang Bumiller [Fri, 22 May 2020 08:55:31 +0000 (10:55 +0200)]
tools: add file_get_non_comment_lines

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosrc/tools/disks.rs: cleanup, remove unused DiskUse bitflag type
Dietmar Maurer [Mon, 8 Jun 2020 07:43:07 +0000 (09:43 +0200)]
src/tools/disks.rs: cleanup, remove unused DiskUse bitflag type

3 years agosrc/tools/disks.rs: use dev_t to index zfs/lvm device sets
Dietmar Maurer [Mon, 8 Jun 2020 07:01:34 +0000 (09:01 +0200)]
src/tools/disks.rs: use dev_t to index zfs/lvm device sets

3 years agoproxmox_backup_manager disk list: display gpt column
Dietmar Maurer [Mon, 8 Jun 2020 05:35:44 +0000 (07:35 +0200)]
proxmox_backup_manager disk list: display gpt column

3 years agosrc/tools/disks/zfs.rs: allow empty zpool list output
Dietmar Maurer [Mon, 8 Jun 2020 05:23:04 +0000 (07:23 +0200)]
src/tools/disks/zfs.rs: allow empty zpool list output

3 years agosrc/tools/disks.rs: new helper to reread partition table
Dietmar Maurer [Mon, 8 Jun 2020 05:22:06 +0000 (07:22 +0200)]
src/tools/disks.rs: new helper to reread partition table

3 years agosrc/api2/node/disks.rs: correctly use disk_by_name insteadf of disk_by_node
Dietmar Maurer [Mon, 8 Jun 2020 05:20:59 +0000 (07:20 +0200)]
src/api2/node/disks.rs: correctly use disk_by_name insteadf of disk_by_node

3 years agosrc/api2/node/disks.rs: implement initgpt API
Dietmar Maurer [Sun, 7 Jun 2020 08:30:34 +0000 (10:30 +0200)]
src/api2/node/disks.rs: implement initgpt API

3 years agosrc/api2/types.rs: define BLOCKDEVICE_NAME_SCHEMA
Dietmar Maurer [Sun, 7 Jun 2020 05:15:15 +0000 (07:15 +0200)]
src/api2/types.rs: define BLOCKDEVICE_NAME_SCHEMA

3 years agosrc/config/acl.rs: add /system/disks to valid acl paths
Dietmar Maurer [Sat, 6 Jun 2020 13:48:15 +0000 (15:48 +0200)]
src/config/acl.rs: add /system/disks to valid acl paths

3 years agosrc/bin/proxmox-backup-manager.rs: add disk subcommand
Dietmar Maurer [Sat, 6 Jun 2020 13:40:28 +0000 (15:40 +0200)]
src/bin/proxmox-backup-manager.rs: add disk subcommand

3 years agosrc/tools/disks.rs: fix disk size, add completion helper
Dietmar Maurer [Sat, 6 Jun 2020 13:39:25 +0000 (15:39 +0200)]
src/tools/disks.rs: fix disk size, add completion helper

3 years agomove disks api to /node/<node>/disks
Dietmar Maurer [Sat, 6 Jun 2020 12:43:36 +0000 (14:43 +0200)]
move disks api to /node/<node>/disks

3 years agosrc/api2/disks.rs: implement smart api
Dietmar Maurer [Sat, 6 Jun 2020 10:23:11 +0000 (12:23 +0200)]
src/api2/disks.rs: implement smart api

3 years agosrc/tools/disks.rs: new helper disk_by_name()
Dietmar Maurer [Sat, 6 Jun 2020 10:22:38 +0000 (12:22 +0200)]
src/tools/disks.rs: new helper disk_by_name()

3 years agosrc/api2/disks.rs - list-disks: add usage-type filter
Dietmar Maurer [Sat, 6 Jun 2020 09:48:58 +0000 (11:48 +0200)]
src/api2/disks.rs - list-disks: add usage-type filter

3 years agosrc/api2/disks.rs: start disks api
Dietmar Maurer [Sat, 6 Jun 2020 09:38:47 +0000 (11:38 +0200)]
src/api2/disks.rs: start disks api

3 years agosrc/tools/disks.rs: use api macro so that we can use those types with the api
Dietmar Maurer [Sat, 6 Jun 2020 09:37:24 +0000 (11:37 +0200)]
src/tools/disks.rs: use api macro so that we can use those types with the api

3 years agosrc/tools/disks.rs - get_disks: query smart status
Dietmar Maurer [Sat, 6 Jun 2020 07:18:20 +0000 (09:18 +0200)]
src/tools/disks.rs - get_disks: query smart status

3 years agosrc/tools/disks/smart.rs: use model.to_string_lossy() to simplify code
Dietmar Maurer [Sat, 6 Jun 2020 07:05:22 +0000 (09:05 +0200)]
src/tools/disks/smart.rs: use model.to_string_lossy() to simplify code

3 years agosrc/tools/disks/smart.rs: try to get correct wearout for ATA devices
Dietmar Maurer [Sat, 6 Jun 2020 07:01:15 +0000 (09:01 +0200)]
src/tools/disks/smart.rs: try to get correct wearout for ATA devices

3 years agosrc/tools/disks/smart.rs - get_smart_data: use &Disk instead of &str
Dietmar Maurer [Sat, 6 Jun 2020 06:23:59 +0000 (08:23 +0200)]
src/tools/disks/smart.rs - get_smart_data: use &Disk instead of &str

So that we can query other device infos easily (model, vendor, ..)

3 years agoui: add gc/prune schedule and options available in the ui
Dominik Csapak [Fri, 5 Jun 2020 08:11:54 +0000 (10:11 +0200)]
ui: add gc/prune schedule and options available in the ui

by adding them as columns for the config view,
and as a seperate tab on the edit window (this is done to not show
too many options at once)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: make DataStore configuration editable
Dominik Csapak [Fri, 5 Jun 2020 08:11:53 +0000 (10:11 +0200)]
ui: make DataStore configuration editable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: refactor DataStoreConfig and Edit
Dominik Csapak [Fri, 5 Jun 2020 08:11:52 +0000 (10:11 +0200)]
ui: refactor DataStoreConfig and Edit

split them into two files and put them into the respective directory

refactor the DataStoreConfigPanel to controller/view
and the DataStoreEdit window/inputpanel to simply an editwindow
(there is no need to have a seperate inputpanel) which also
prepares the window for edit (by using pmxDisplayEditFields)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: replace DataStoreStatus with DataStoreConfig
Dominik Csapak [Fri, 5 Jun 2020 08:11:51 +0000 (10:11 +0200)]
ui: replace DataStoreStatus with DataStoreConfig

We will show an overall status of the DataStores in the Dashboard, so there
is no need for a seperate DataStores Status.

This means we can move the Config to where the Status was, and remove
the duplicated entry in the NavigationTree, reducing confusion for users

We can still seperate the permissions by simply showing a permission
denied error, or simply leaving the list empty

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosrc/tools/disks/smart.rs: parse output from smartctl
Dietmar Maurer [Fri, 5 Jun 2020 16:30:06 +0000 (18:30 +0200)]
src/tools/disks/smart.rs: parse output from smartctl

3 years agosrc/tools/disks.rs: implement get_disks (similar to the one in PVE::Diskmanage)
Dietmar Maurer [Fri, 5 Jun 2020 08:00:05 +0000 (10:00 +0200)]
src/tools/disks.rs: implement get_disks (similar to the one in PVE::Diskmanage)

But no ceph support for now. Also no support for old cciss block devices.

3 years agosrc/tools/disks.rs; use correct subdir to check holders
Dietmar Maurer [Fri, 5 Jun 2020 07:27:48 +0000 (09:27 +0200)]
src/tools/disks.rs; use correct subdir to check holders

3 years agosrc/tools/disks.rs: fix disk type detection, remove newline from vendor string
Dietmar Maurer [Fri, 5 Jun 2020 06:09:52 +0000 (08:09 +0200)]
src/tools/disks.rs: fix disk type detection, remove newline from vendor string

3 years agodepend on proxmox 0.1.39
Dietmar Maurer [Fri, 5 Jun 2020 06:08:40 +0000 (08:08 +0200)]
depend on proxmox 0.1.39

3 years agoui: fix prune button
Dominik Csapak [Thu, 4 Jun 2020 10:38:45 +0000 (12:38 +0200)]
ui: fix prune button

the remove button did not get the selModel since the xytpe was not
'grid' so give it the correct xtype

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump version to 0.2.3-1 v0.2.3
Thomas Lamprecht [Thu, 4 Jun 2020 08:39:11 +0000 (10:39 +0200)]
bump version to 0.2.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agorrd: fix off-by-one in save interval calculation
Thomas Lamprecht [Thu, 4 Jun 2020 08:30:47 +0000 (10:30 +0200)]
rrd: fix off-by-one in save interval calculation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix csum calculation of not 'chunk_size' aligned images
Dominik Csapak [Thu, 4 Jun 2020 08:12:10 +0000 (10:12 +0200)]
fix csum calculation of not 'chunk_size' aligned images

the last chunk does not have to be as big as the chunk_size,
just use the already available 'chunk_end' function which does the
correct thing

this fixes restoration of images whose sizes are not a multiple of
'chunk_size' as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosrc/tools/disks/lvm.rs: implement get_lvm_devices()
Dietmar Maurer [Thu, 4 Jun 2020 07:12:19 +0000 (09:12 +0200)]
src/tools/disks/lvm.rs: implement get_lvm_devices()

3 years agosrc/tools/disks.rs: add/use get_partition_type_info
Dietmar Maurer [Thu, 4 Jun 2020 05:48:22 +0000 (07:48 +0200)]
src/tools/disks.rs: add/use get_partition_type_info

3 years agoimprove display of 'next run' for sync jobs
Dominik Csapak [Wed, 3 Jun 2020 14:34:07 +0000 (16:34 +0200)]
improve display of 'next run' for sync jobs

if the last sync job is too far in the past (or there was none at all
for now) we run it at the next iteration, so we want to show that

we now calculate the next_run by using either the real last endtime
as time or 0

then in the frontend, we check if the next_run is < now and show 'pending'
(we do it this way also for replication on pve)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotools/systemd/time: fix compute_next_event for weekdays
Dominik Csapak [Wed, 3 Jun 2020 14:34:06 +0000 (16:34 +0200)]
tools/systemd/time: fix compute_next_event for weekdays

two things were wrong here:
* the range (x..y) does not include y, so the range
  (day_num+1..6) goes from (day_num+1) to 5 (but sunday is 6)

* WeekDays.bits() does not return the 'day_num' of that day, but
  the bit value (e.g. 64 for SUNDAY) but was treated as the index of
  the day of the week
  to fix this, we drop the map to WeekDays and use the 'indices'
  directly

this patch makes the test work again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosystemd/time: add tests for all weekdays
Dominik Csapak [Wed, 3 Jun 2020 14:34:05 +0000 (16:34 +0200)]
systemd/time: add tests for all weekdays

this fails for now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoverify_file: add missing closing parenthesis in error message
Thomas Lamprecht [Wed, 3 Jun 2020 17:09:58 +0000 (19:09 +0200)]
verify_file: add missing closing parenthesis in error message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agosrc/tools/disks/zfs.rs: add parser for zpool list output
Dietmar Maurer [Wed, 3 Jun 2020 10:16:08 +0000 (12:16 +0200)]
src/tools/disks/zfs.rs: add parser for zpool list output

3 years agobump version to 0.2.2-1 v0.2.2
Dietmar Maurer [Wed, 3 Jun 2020 08:37:46 +0000 (10:37 +0200)]
bump version to 0.2.2-1

3 years agosrc/bin/proxmox-backup-client.rs: implement quite flag
Dietmar Maurer [Wed, 3 Jun 2020 08:11:37 +0000 (10:11 +0200)]
src/bin/proxmox-backup-client.rs: implement quite flag

3 years agoclient restore: don't add server file ending if already specified
Thomas Lamprecht [Tue, 2 Jun 2020 16:41:32 +0000 (18:41 +0200)]
client restore: don't add server file ending if already specified

If one executes a client command like
 # proxmox-backup-client files <snapshot> --repository ...
the files shown have already the '.fidx' or '.blob' file ending, so
if a user would just copy paste that one the client would always add
.blob, and the server would not find that file.

So avoid adding file endings if it is already a known OK one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclient restore: factor out archive/type parsing
Thomas Lamprecht [Tue, 2 Jun 2020 16:41:31 +0000 (18:41 +0200)]
client restore: factor out archive/type parsing

will be extended in a next patch.

Also drop a dead else branch, can never get hit as we always add
.blob as fallback

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix typo
Dietmar Maurer [Wed, 3 Jun 2020 04:59:43 +0000 (06:59 +0200)]
fix typo

3 years agoclient: improve connection/new fingerprint query
Wolfgang Bumiller [Tue, 26 May 2020 09:52:36 +0000 (11:52 +0200)]
client: improve connection/new fingerprint query

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotypo fixes all over the place
Thomas Lamprecht [Sat, 30 May 2020 14:37:33 +0000 (16:37 +0200)]
typo fixes all over the place

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agosrc/client/pull.rs: also download client.log.blob
Dietmar Maurer [Sat, 30 May 2020 12:39:38 +0000 (14:39 +0200)]
src/client/pull.rs: also download client.log.blob

3 years agoavoid compiler warnings
Dietmar Maurer [Sat, 30 May 2020 12:05:33 +0000 (14:05 +0200)]
avoid compiler warnings

3 years agocleanup: define/use const for predefined blob file names.
Dietmar Maurer [Sat, 30 May 2020 12:04:15 +0000 (14:04 +0200)]
cleanup: define/use const for predefined blob file names.

3 years agosrc/client/backup_specification.rs: split code into extra file
Dietmar Maurer [Sat, 30 May 2020 08:54:38 +0000 (10:54 +0200)]
src/client/backup_specification.rs: split code into extra file

3 years agosrc/client/pull.rs: more verbose logging
Dietmar Maurer [Sat, 30 May 2020 06:12:43 +0000 (08:12 +0200)]
src/client/pull.rs: more verbose logging

3 years agoui: use Proxmox.Utils.setAuthData
Dominik Csapak [Fri, 29 May 2020 14:22:14 +0000 (16:22 +0200)]
ui: use Proxmox.Utils.setAuthData

this uses different parameters which we want to be the same for
all products (e.g. secure cookie)

leave the PBS.Utils.updateLoginData for the case that we want to do
something more here (as in pve for example)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoadd owner to group and snapshot listings
Dominik Csapak [Fri, 29 May 2020 13:09:01 +0000 (15:09 +0200)]
add owner to group and snapshot listings

while touching it, make columns and tbar in DataStoreContent.js
declarative members and remove the (now) unnecessary initComponent

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: add SyncView
Dominik Csapak [Fri, 29 May 2020 08:53:42 +0000 (10:53 +0200)]
ui: add SyncView

shows a nice overview of sync jobs (incl status of last run, estimated
next run, etc.) with options to add/edit/remove and also show the
log of the last run and manually run it now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: add SyncJobEdit window
Dominik Csapak [Fri, 29 May 2020 08:53:41 +0000 (10:53 +0200)]
ui: add SyncJobEdit window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: add RemoteSelector and DataStoreSelector
Dominik Csapak [Fri, 29 May 2020 08:53:40 +0000 (10:53 +0200)]
ui: add RemoteSelector and DataStoreSelector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2: add admin/sync endpoint
Dominik Csapak [Fri, 29 May 2020 08:53:39 +0000 (10:53 +0200)]
api2: add admin/sync endpoint

this returns the list of syncjobs with status, as opposed to
config/sync (which is just the config)

also adds an api call where users can run the job manually under
/admin/sync/$ID/run

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoconfig/sync: add SyncJobStatus Struct/Schema
Dominik Csapak [Fri, 29 May 2020 08:53:38 +0000 (10:53 +0200)]
config/sync: add SyncJobStatus Struct/Schema

contains the config + status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agosyncjob: change worker type for sync jobs
Dominik Csapak [Fri, 29 May 2020 08:53:37 +0000 (10:53 +0200)]
syncjob: change worker type for sync jobs

'sync' is used for manually pulling a remote datastore
changing it for a scheduled sync to 'syncjob' so that we can
differentiate between both types of syncs

this also adds a seperate task description for it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/pull: refactor priv checking and creating pull parameters
Dominik Csapak [Fri, 29 May 2020 08:53:36 +0000 (10:53 +0200)]
api2/pull: refactor priv checking and creating pull parameters

we want to reuse those in the api call for manually running a sync job

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/config/sync: fix id parameter
Dominik Csapak [Fri, 29 May 2020 08:53:35 +0000 (10:53 +0200)]
api2/config/sync: fix id parameter

'name' is not the correct parameter for get/post

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