Wolfgang Bumiller
591b120d35
fix feature flag logic in pxar create
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-12 10:17:51 +01:00
Thomas Lamprecht
d1d74c4367
typo fixes all over the place
...
found and semi-manually replaced by using:
codespell -L mut -L crate -i 3 -w
Mostly in comments, but also email notification and two occurrences
of misspelled 'reserved' struct member, which where not used and
cargo build did not complain about the change, soo ...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-10 16:39:57 +01:00
Dietmar Maurer
5ca5f8daf3
pmt: add tape-alert-flags command
2021-03-08 07:37:05 +01:00
Dietmar Maurer
40bf636b47
ui: enable experimental tape UI if tape.cfg exists
2021-03-03 09:02:02 +01:00
Dietmar Maurer
3832911d50
docs: remove backup protocol api dumps
...
We now have the api-viewer for that.
2021-02-26 19:00:08 +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
Wolfgang Bumiller
3554fe6480
update to schema changes in proxmox
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-24 14:50:08 +01:00
Dietmar Maurer
2037d9af03
api-viewer: show permissions
2021-02-22 12:01:24 +01:00
Dietmar Maurer
451856d21d
api-viewer: fix path for upgraded HTTP/2 proptocls
2021-02-22 08:38:27 +01:00
Dietmar Maurer
aa30663ca5
docgen: improve regex format
2021-02-21 16:14:11 +01:00
Dietmar Maurer
8616a4afe5
docgen: dump string format (property strings)
2021-02-21 15:54:14 +01:00
Dietmar Maurer
bc2358319b
docgen: improve api schema dump
2021-02-21 12:00:06 +01:00
Dietmar Maurer
0bf4b81370
docs: api-viewer - add backup and restore APIs
2021-02-21 10:38:33 +01:00
Dietmar Maurer
fee0fe5422
docgen: implement api schema generation (for api-viewer)
...
Just a start - not complete jet.
2021-02-21 09:06:58 +01:00
Dietmar Maurer
cd44fb8d84
tape: create tmp dirs early at server startup
2021-02-19 18:10:02 +01:00
Dietmar Maurer
4188fd59a0
tape: cache changer state
2021-02-19 16:48:19 +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
9bbd83b1f2
tape: media_list API - allow to update online status for a single changer
2021-02-18 10:59:33 +01:00
Dietmar Maurer
d0647e5a02
tape: use worker tasks for media load/unload
2021-02-18 09:04:51 +01:00
Stefan Reiter
f1a83e9759
client: extract common functions to proxmox_client_tools module
...
...including common schemata, connect(), extract_*() and completion
functions.
For later use with proxmox-file-restore binary.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-02-17 10:13:10 +01:00
Stefan Reiter
6afb60abf5
asyncify pxar create_archive
...
...to take advantage of the aio::Encoder from the pxar create.
Rather straightforward conversion, but does require getting rid of
references in the Archiver struct, and thus has to be given the Mutex
for the catalog directly. The callback is boxed.
archive_dir_contents can call itself recursively, and thus needs to
return a boxed future.
Users are adjusted, namely PxarBackupStream is converted to use an
Abortable future instead of a thread so it supports async in its handler
function, and the pxar bin create_archive is converted to an async API
function. One test case is made to just use 'block_on'.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-17 09:24:20 +01:00
Dietmar Maurer
41a8db3576
tape: implement API to run tape backup jobs
2021-02-15 11:09:30 +01:00
Dietmar Maurer
adb65b9889
tape: fix proxmox-tape pool config command
2021-02-15 08:58:05 +01:00
Dietmar Maurer
8513626b9f
proxmox-backup-proxy: schedule tape backup jobs
2021-02-15 08:30:42 +01:00
Dietmar Maurer
7ca0ba4515
tape: add tape-job.cfg manual page
2021-02-15 07:05:39 +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
4a874665eb
proxmox-backup-manger verify-job CLI
...
Add missing command line interface to manage verification jobs.
2021-02-11 14:06:44 +01:00
Dietmar Maurer
5b7f44555e
docs: add manual page for verification.cfg
2021-02-11 13:40:11 +01:00
Dietmar Maurer
2ca396c015
docs: add manual page for acl.cfg
2021-02-11 13:13:34 +01:00
Dietmar Maurer
9f35e44681
fix proxmox_backup_manager remote list: s/userid/auth-id/
2021-02-11 11:31:20 +01:00
Dietmar Maurer
6279b8f5a5
docs: add manukal page for remote.cfg
2021-02-11 11:25:15 +01:00
Dietmar Maurer
3084232cb5
depend on proxmox 0.10.5
2021-02-11 10:49:16 +01:00
Dietmar Maurer
2322a980d0
docs: add utility binary to generate docs
2021-02-10 11:05:02 +01:00
Fabian Grünbichler
15d2c7786e
client: move test output files to target/testout
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-08 09:52:16 +01:00
Dietmar Maurer
fbf8779388
doc: improve pmt/pmtx manual pages
2021-02-06 16:50:56 +01:00
Fabian Grünbichler
2f26b8668a
client: track key source, print when used
...
to avoid confusing messages about using encryption keys when restoring
plaintext backups, or about loading master keys when they are not
actually used for the current operation.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 09:07:31 +01:00
Fabian Grünbichler
9432838914
client: refactor crypto_parameter handling
...
pull out the crypt-mode to logically group arms and make the whole mess
a bit more "human-parsable".
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 09:06:28 +01:00
Fabian Grünbichler
1a89a7794e
client: extend tests for master key handling
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 09:05:01 +01:00
Fabian Grünbichler
c0a87c12fb
client: allow passing specific master key
...
it's needed for PVE's LXC integration, and might be interesting for
other more special usage scenarios as well.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 09:04:42 +01:00
Fabian Grünbichler
c6a7ea0a2f
client: refactor keyfile_parameters
...
no semantic changes intended
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 09:03:03 +01:00
Fabian Grünbichler
5bb057e5a2
client: add test for keyfile_parameters
...
this will get more complex soon, so add test to document current
behaviour.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 08:58:15 +01:00
Fabian Grünbichler
2924b37d6d
key: rustfmt module
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 08:56:19 +01:00
Fabian Grünbichler
42c0f784e2
key: add show-master-pubkey command
...
and print public key when generating/importing..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 08:55:21 +01:00
Fabian Grünbichler
05f17d1ec4
key: make 'default' master key explicit
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-06 08:52:11 +01:00
Dietmar Maurer
4c209d6b10
install pmt binary
2021-02-05 12:42:20 +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
0d4e4cae7f
tape: improve pmt command line completion
2021-02-03 08:54:12 +01:00
Dietmar Maurer
8937c65951
tape: add pmt stoptions/stsethoptions/stclearoptions
2021-02-02 08:58:02 +01:00
Dietmar Maurer
6c6ad82d90
tape: add pmt setblk
2021-02-02 07:19:54 +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
19e4a36c70
tape: do not use drive.open() within pmt
...
Do not fail if no media is loaded. Inportant for load command.
2021-02-01 12:39:50 +01:00
Dietmar Maurer
90769e5694
tape: add pmt lock/unlock
2021-02-01 12:18:55 +01:00
Dietmar Maurer
d690d14568
tape: add pmt bsr/fsr
2021-02-01 10:39:04 +01:00
Dietmar Maurer
85ef624440
tape: add pmt asf
2021-02-01 10:32:21 +01:00
Dietmar Maurer
e995996290
tape: pmt - fix count parameter schema
2021-02-01 10:21:25 +01:00
Dietmar Maurer
8e6ad4301d
tape: add pmt fsfm/bsfm, pass count as arg_param
2021-02-01 10:18:18 +01:00
Dietmar Maurer
9883b54cba
tape: remove drive from pool config
2021-02-01 09:14:28 +01:00
Dietmar Maurer
83b8949a98
tape: add pmt weof
2021-01-31 17:33:07 +01:00
Dietmar Maurer
28f60e5291
cleanup: avoid compiler warnings
2021-01-31 17:02:55 +01:00
Dietmar Maurer
1f31d06f48
tape: add pmt bsf
2021-01-31 17:00:15 +01:00
Dietmar Maurer
2f2e83c890
tape: add pmt fsf
2021-01-31 16:54:16 +01:00
Dietmar Maurer
b22c618734
tape: add pmt erase
2021-01-31 16:34:10 +01:00
Dietmar Maurer
1e041082bb
tape: add pmt command line tool
...
Experimental, not installed by now.
2021-01-31 16:19:53 +01:00
Dietmar Maurer
9586ce2f46
tape: move scan_drives API code to correct file
2021-01-30 08:03:17 +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
Dominik Csapak
627d000098
tape: change changer-drive-id to changer-drivenum
...
because it changed in the config
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 15:11:22 +01:00
Dietmar Maurer
87f4be7998
tape: use api to run proxmox-tape backup
2021-01-28 14:56:42 +01:00
Dominik Csapak
5fdaecf6f4
api2/tape/drive: reorganize drive api
...
similar to the changers, create a listing at /tape/drive and put
the specific api calls below that
move the scan api call up one level
remove the status info from the config listing
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 11:15:17 +01:00
Dietmar Maurer
651a61f559
pmtx: implement scan command
2021-01-27 12:40:51 +01:00
Dietmar Maurer
887f1cb90c
cleanup: move scan changers API implementation
2021-01-27 09:58:16 +01:00
Dominik Csapak
740dc9d1d4
api2/tape/changer: reorganize api
...
add a changer listing here (copied from api2/config/changer)
and put the status and transfer api calls below that
puts the changer scan into the top level tape api
and removes the (now redundant) info from the config api path
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-26 12:47:34 +01:00
Dietmar Maurer
c3747b93c8
tape: add new command line tool "pmtx"
...
Also improve sgutil2 error reporting
2021-01-26 11:57:15 +01:00
Fabian Grünbichler
4d104cd4d8
clippy: more misc fixes
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:54:55 +01:00
Fabian Grünbichler
367c0ff7c6
clippy: allow api functions with many arguments
...
some of those can be reduced/cleaned up when we have updater support in
the api macro.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:54:52 +01:00
Fabian Grünbichler
93e3581ce7
derive/impl and use Default for some structs
...
and revamp HttpClientOptions with two constructors for the common use
cases
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:54:45 +01:00
Fabian Grünbichler
72064fd0df
pxar: extract PxarExtractOptions
...
same as PxarCreateOptions, but for extraction/restore rather than
create.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:54:36 +01:00
Fabian Grünbichler
77486a608e
pxar: factor out PxarCreateOptions
...
containing the CLI parameters that are mostly passed-through from the
client to our pxar archive creation wrapper in pxar::create
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:54:32 +01:00
Fabian Grünbichler
e97025ab02
pxar: typedef on_error as ErrorHandler
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:54:26 +01:00
Fabian Grünbichler
e43b9175c0
client: factor out UploadOptions
...
to reduce function signature complexity.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:54:18 +01:00
Fabian Grünbichler
6d233161b0
client: refactor catalog upload spawning
...
by pulling out Result type into separate struct
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 09:53:51 +01:00
Dietmar Maurer
64b83c3d70
tape: implement paperkey command for tape encryption keys
2021-01-22 09:56:14 +01:00
Dietmar Maurer
639a6782bd
paperkey: move code to src/tools/paperkey.rs
2021-01-22 09:42:59 +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
645a044bf6
tape: further hierarchy improvements
2021-01-21 17:25:32 +01:00
Dietmar Maurer
37796ff73f
tape: change code hierarchy to improve docs
2021-01-21 17:12:01 +01:00
Dietmar Maurer
1c86893d95
cleanup: always compute fingerprint in KeyConfig constructors
2021-01-21 11:56:54 +01:00
Dietmar Maurer
d543587d34
Merge branch 'master' of ssh://proxdev.maurer-it.com/rust/proxmox-backup
2021-01-21 10:56:52 +01:00
Dietmar Maurer
2b191385ea
tape: use specialized encryption key per media-set
2021-01-21 10:31:49 +01:00
Fabian Grünbichler
ea368a06cd
clippy: misc. fixes
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:23:54 +01:00
Fabian Grünbichler
17c7b46a69
clippy: use unwrap_or_default
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:23:54 +01:00
Fabian Grünbichler
a375df6f4c
clippy: use copied/cloned instead of map
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:23:54 +01:00