Dietmar Maurer
d4877712f8
pbs-client: avoid mut self in http_client methods.
...
It is not necessary, so avoid it. The client can now be used
with multiple threads (without using a Mutex).
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-12-04 14:44:05 +01:00
Thomas Lamprecht
a58a5cf795
move HumanByte to pbs-abi-types crate
...
Originally-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-20 19:35:24 +01:00
Dietmar Maurer
9a1b24b6b1
use new proxmox-async crate
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 18:03:22 +01:00
Dominik Csapak
efd2713aa8
proxmox-tape: add groups filter to backup command
...
and add a completion handler to complete the backup groups
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-18 10:36:57 +01:00
Dominik Csapak
097ccfe1d5
proxmox-tape: add missing 'notify-user' option to backup command
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-18 10:36:57 +01:00
Wolfgang Bumiller
6ef1b649d9
update to first proxmox crate split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:58:49 +02:00
Wolfgang Bumiller
01a080215d
drop pbs_tools::auth
...
`pbs_client::connect_to_localhost` now requires the key as
optional parameter
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-09-29 11:08:52 +02:00
Dietmar Maurer
048b43af24
split tape code into new pbs_tape workspace
2021-09-13 12:54:59 +02:00
Dietmar Maurer
6227654ad8
more api type cleanups: avoid re-exports
2021-09-10 12:25:32 +02:00
Dominik Csapak
e384f16a19
proxmox-tape: add 'force-media-set' also to cli
...
we have it in the api and gui, but the cli was missing
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-09-10 10:06:21 +02:00
Dietmar Maurer
e7d4be9d85
move datastore config to pbs_config workspace
2021-09-10 08:40:58 +02:00
Dietmar Maurer
aad2d162ab
move media_pool config to pbs_config workspace
2021-09-06 08:56:04 +02:00
Dietmar Maurer
1ce8e905ea
move drive config to pbs_config workspace
...
Also moved the tape type definitions to pbs_api_types.
2021-09-03 09:10:18 +02:00
Wolfgang Bumiller
2b7f8dd5ea
move client to pbs-client subcrate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-19 12:58:43 +02:00
Wolfgang Bumiller
770a36e53a
add pbs-tools subcrate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-06 15:10:37 +02:00
Wolfgang Bumiller
d420962fbc
split out pbs-runtime module
...
These are mostly tokio specific "hacks" or "workarounds" we
only really need/want in our binaries without pulling it in
via our library crates.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-06 14:52:25 +02:00
Dominik Csapak
0ecdaa0dc0
bin/proxmox-tape: add optional snapshots to restore command
...
and add the appropriate completion helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-05-11 12:57:14 +02:00
Dominik Csapak
671c6a96e7
bin: use extract_output_format where necessary
...
else we sometimes forget to remove it from the 'params' variable
and use that further, running into 'invalid parameter' errors
found by giving 'output-format' paramter to proxmox-tape status
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-05-03 08:58:35 +02:00
Dietmar Maurer
90461b76fb
TapeRead: add skip_data()
2021-04-13 13:32:45 +02:00
Dietmar Maurer
318b310638
tape: improve EOT error handling
2021-04-12 13:27:34 +02:00
Dietmar Maurer
0892a512bc
tape: correctly set/display drive option
2021-04-08 07:28:30 +02:00
Dietmar Maurer
7b11a8098d
tape: make sure there is a filemark at the end of the tape
2021-04-08 07:28:30 +02:00
Dietmar Maurer
e29f456efc
tape: implement format/erase
2021-04-08 07:28:30 +02:00
Dietmar Maurer
c553407e98
tape: add --scan option for catalog restore
2021-03-25 13:08:34 +01:00
Dominik Csapak
0320deb0a9
proxmox-tape: fix clean api call
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-25 08:14:13 +01:00
Dominik Csapak
4c4e5c2b1e
api2/tape/restore: enable restore mapping of datastores
...
by changing the 'store' parameter of the restore api call to a
list of mappings (or a single default datastore)
for example giving:
a=b,c=d,e
would restore
datastore 'a' from tape to local datastore 'b'
datastore 'c' from tape to local datastore 'e'
all other datastores to 'e'
this way, only a single datastore can also be restored, by only
giving a single mapping, e.g. 'a=b'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-25 07:46:12 +01:00
Dominik Csapak
e36135031d
ui: tape/Restore: let the user choose an owner
...
so that the tape backup can be restored as any user, given
the current logged in user has the correct permission.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-16 08:55:42 +01:00
Dominik Csapak
5a5ee0326e
proxmox-tape: add missing notify-user to 'proxmox-tape restore'
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-16 08:54:38 +01:00
Dietmar Maurer
0023cfa385
tape: fix 'proxmox-tape backup' cli command
2021-02-26 08:51:24 +01:00
Dietmar Maurer
5830e5620d
tape: cleanup TapeJob implementation - uses AllOf Schema with SectionConfig
2021-02-25 09:44:31 +01:00
Dominik Csapak
926d05ef0b
api2/tape/{backup, restore}, proxmox-tape: set device state
...
set the drive device state everywhere we lock it, so that we
know what it currently does
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:16:30 +01:00
Dietmar Maurer
d0647e5a02
tape: use worker tasks for media load/unload
2021-02-18 09:04:51 +01:00
Dietmar Maurer
be327dbccd
tape: add tape backup job configuration
2021-02-14 10:35:51 +01:00
Dominik Csapak
85cdc4f371
proxmox-tape: change lookup_drive_name to extract_drive_name
...
in most uses, we want to remove the drive from the param afterwards
where we don't, we already overwrite it with the result of this function
this fixes some commands (like 'proxmox-tape read-label --drive foo')
that failed with:
parameter 'drive': duplicate parameter.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-11 14:22:50 +01:00
Dietmar Maurer
25aa55b5f5
tape: correctly lock the tape device
2021-02-05 10:50:21 +01:00
Dietmar Maurer
f47e035721
tape: cleanup - move tape file readers/writers into src/tape/file_formats folder
2021-02-04 07:59:37 +01:00
Dietmar Maurer
d0f11b66f7
thape: add read_tapedev_options, display driver options with status command
2021-02-02 06:40:40 +01:00
Dietmar Maurer
9883b54cba
tape: remove drive from pool config
2021-02-01 09:14:28 +01:00
Dietmar Maurer
c297835b01
tape: proxmox-tape - use API instead of direct functions calls
2021-01-29 11:49:11 +01:00
Dietmar Maurer
e68269fcaf
tape: proxmox-tape inventory: call API
2021-01-29 11:21:57 +01:00
Dietmar Maurer
5243df4712
tape: proxmox-tape - use API instead of direct functions calls
2021-01-29 10:50:11 +01:00
Dietmar Maurer
4470eba551
cleanup: factor out common client code to view task log/result
2021-01-29 10:10:04 +01:00
Dietmar Maurer
41dacd5d3d
tape: use worker task for eject-media api
2021-01-28 16:49:08 +01:00
Dietmar Maurer
eb1dfb02b5
tape: proxmox-tape - use api for erase-media and rewind
2021-01-28 16:36:10 +01:00
Dietmar Maurer
87f4be7998
tape: use api to run proxmox-tape backup
2021-01-28 14:56:42 +01:00
Dietmar Maurer
5f34d69bcc
tape: add volume-statistics api/command
2021-01-22 08:45:35 +01:00
Dietmar Maurer
337ff5a3cc
tape: add estimated medium wearout to status
2021-01-22 08:06:25 +01:00
Dietmar Maurer
37796ff73f
tape: change code hierarchy to improve docs
2021-01-21 17:12:01 +01:00
Fabian Grünbichler
6334bdc1c5
clippy: collapse nested ifs
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:23:54 +01:00
Dietmar Maurer
8a0046f519
tape: implement encrypted backup - simple version
...
This is just a proof of concept, only storing the encryption key fingerprint
inside the media-set label.
2021-01-18 13:38:22 +01:00