Commit Graph

2075 Commits

Author SHA1 Message Date
Dietmar Maurer 20197f7cf5 src/api2/node/syslog.rs: use api macro 2019-12-17 13:26:49 +01:00
Thomas Lamprecht 87b4d953bf ui: main init: set username info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 13:00:17 +01:00
Thomas Lamprecht 3a84100428 ui login: default to root@pam user and focus password field
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 11:35:39 +01:00
Dietmar Maurer 7f816d468a install ext6-pbs.css 2019-12-17 11:34:29 +01:00
Thomas Lamprecht 9c01e73c2f ui: add "Documentation" button to main view
Similar to PVE and PMG, for quick access when one has the basic
webinterface open anyway. Should move to the "proxmoxHelpButton" once
we have an onlineHelp mapping to the docs.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 11:22:34 +01:00
Thomas Lamprecht 2d694f8f1f add CSS file for PBS ExtJS6 basic ui
some fitting rules copied over from PVE's ext6-pve.css file.
simply place it in the css subfolder where the proxmox-backup-gui.js
file is hosted and add a "css/" alias for that directory, the
formatter gets use the right content type with that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 11:20:32 +01:00
Christian Ebner 25cdd0e0a1 catalog_shell: impl find for catalog shell.
Implements the find command which allows to find and select files for subsequent
restore.
Files selected for restore are now stored in a Vec instead of a HashSet.
This is needed, since instead of the full paths for each file, selected files are
now identified by a list of match pattern, where ordering matters.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-17 11:12:34 +01:00
Christian Ebner 90dfd0a71d catalog: impl find() for file search by match pattern.
find() iterates over the file tree and matches each node against a list of match
patterns provided at function call.
For each matching node, a callback function with the current directroy stack is
called.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-17 11:12:34 +01:00
Christian Ebner a333b4ccea pxar: match_pattern: impl invert() to switch the match type of a MatchPattern.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-17 11:12:34 +01:00
Christian Ebner 48af80b3ab pxar: match_pattern: impl traits needed for MatchPattern to be comparable.
In order to check if two MatchPattern are identical, which will be used to avoid
duplicates.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-17 11:12:34 +01:00
Christian Ebner 255bb86030 pxar: match_pattern: refactor MatchPattern and introduce MatchPatternSlice.
The MatchPattern impl heavily used copies and therefore was inefficient regarding
memory management.
This patch intoduces MatchPatternSlice as struct to avoid copies and perform the
same pattern matching functionality.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-17 11:12:34 +01:00
Wolfgang Bumiller dc08934563 drop Cancellable future in favor of abortable
futures-0.3 has a futures::future::abortable() function
which does the exact same, returns an Abortable future with
an AbortHandle providing an abort() method.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-17 10:52:07 +01:00
Wolfgang Bumiller 8554ac5ec3 fix broadcast_future test case
We used to await all the futures via the runtime's shutdown
method, which doesn't exist anymore, so await all the join
handles instead.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-17 10:47:12 +01:00
Thomas Lamprecht ba3eb88d95 generate authkey: public part needs to be readable by backup group
else the API proxy cannot use it and fails to run..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 10:17:03 +01:00
Thomas Lamprecht 9c18e93522 handle_static_file_download: move from and_then to await
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 08:56:55 +01:00
Thomas Lamprecht 4e8cff1c9d cipherbench: align/format output nicely
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 08:49:34 +01:00
Thomas Lamprecht 4832f53ab5 cipherbench: be conform with rfc7539, use 12 byte nonce
else we get an error from this call, using a 16 byte (128 bit) nonce
is currently only supported by the still in draft
XChaCha20-Poly1305, not the current default specified by RFC 7539[0],
which uses a 12 byte (96 bit) nonce.

Fixes the following error:
> thread 'main' panicked at 'called `Result::unwrap()` on an `Err`
> value: ErrorStack([])', src/libcore/result.rs:1165:5

[0]: https://tools.ietf.org/html/rfc7539

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 08:49:07 +01:00
Thomas Lamprecht b5907d8ad8 ui: services-administration: s/pmg/proxmox-backup/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-16 16:48:50 +01:00
Thomas Lamprecht 05c031612e d/rules: override dwz helper to avoid build-failure
AFAICT, this is the issue from Debian Bug #933541, I implement the
workaround suggested by a maintainer[0].

[0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933541#10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-16 16:38:03 +01:00
Thomas Lamprecht 1182a3c40d Revert "d/control: add llvm-dev to build-dependencies"
llvm-dev was wrong, llvm-config is shipped by llvm package

This reverts commit 2db252aeae.
2019-12-16 15:33:57 +01:00
Oguz Bektas 2db252aeae d/control: add llvm-dev to build-dependencies
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-16 15:17:14 +01:00
Wolfgang Bumiller dd8c03a277 buildsys: make deb: use --lib for first pass build
since it'll rebuild the lib & binaries anyway after the
copy, only build the library (to get the dependencies out of
the way), but dont build the binaries...

saves a couple seconds of build time

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-16 14:07:15 +01:00
Dietmar Maurer a47a02ae62 src/bin/proxmox-backup-client.rs: use #[api] macro 2019-12-16 13:49:18 +01:00
Thomas Lamprecht ba0f71f5eb d/control: add rsync to build-dependencies
not directly required for

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-16 11:32:44 +01:00
Thomas Lamprecht f1e8935b45 d/control: add missing build-dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-16 11:24:57 +01:00
Wolfgang Bumiller 78d5436040 client: use api macro for catalog_shell async fn
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-16 11:24:44 +01:00
Dietmar Maurer 87c423751a src/bin/proxmox-backup-client.rs: use ApiHandler::Async for prune and status 2019-12-16 11:00:43 +01:00
Dietmar Maurer 8a8a470316 src/bin/proxmox-backup-client.rs: use new ApiHandler::Async 2019-12-16 10:06:26 +01:00
Dietmar Maurer b9799012cf src/pxar/decoder.rs: require Send 2019-12-16 10:01:51 +01:00
Dietmar Maurer bb084b9c91 api2: update for latest proxmox-api changes
- rename ApiFuture into ApiResponseFuture
- impl. ApiHandler::Async
2019-12-16 10:01:51 +01:00
Dietmar Maurer 236a396aa1 src/api2/admin/datastore.rs - prune: log retention options 2019-12-14 16:32:16 +01:00
Dietmar Maurer 503995c767 src/api2/admin/datastore.rs: fix prune worker id 2019-12-14 16:05:21 +01:00
Dietmar Maurer e1c356ec06 docs/administration-guide.rst: document garbage collection 2019-12-14 15:52:25 +01:00
Dietmar Maurer 720776b81e generate separate proxmox-backup-docs package 2019-12-13 14:15:07 +01:00
Dietmar Maurer 729e38f475 Makefile: add upload target 2019-12-13 14:15:07 +01:00
Wolfgang Bumiller f374ba4c0b update tests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-13 12:42:02 +01:00
Wolfgang Bumiller b5c9a706ce fix cancellable future
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-13 12:10:04 +01:00
Wolfgang Bumiller 8a1028e0e7 update to url/percent-encoding to 2.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-13 11:57:01 +01:00
Wolfgang Bumiller db0cb9ce0b update a chunk of stuff to the hyper release
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-13 11:24:41 +01:00
Dietmar Maurer 3f1020b732 src/bin/proxmox-backup-client.rs: implement task stop 2019-12-13 09:43:08 +01:00
Dietmar Maurer 1ae5677de0 src/api2/types.rs: use PROXMOX_SAFE_ID_FORMAT instead of FILENAME_FORMAT 2019-12-12 14:15:40 +01:00
Dietmar Maurer d0adf270fb src/api2/types.rs: introduce PROXMOX_SAFE_ID_REGEX, use it for DATASTORE_SCHEMA 2019-12-12 12:37:11 +01:00
Dietmar Maurer 66c49c21c3 src/api2/types.rs: factor out DATASTORE_SCHEMA 2019-12-11 13:45:23 +01:00
Dietmar Maurer 567d3e00fb src/api2/node/tasks.rs: new filter "store" to filter tasks for one store 2019-12-11 12:53:34 +01:00
Christian Ebner d3dbe52f37 pxar: match_pattern: refactor match_filename
The match_filename() in sequentail_decoder and encoder are moved to be static
functions of MatchPattern.
This allows to reuse the code also in the catalog find implementation.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-11 10:55:01 +01:00
Christian Ebner f084505ec5 src/backup/catalog_shell.rs: sort output of list-selected
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-11 10:54:20 +01:00
Dietmar Maurer 6d04612955 src/api2/node/tasks.rs: add "running" filter to list only running tasks 2019-12-11 10:52:27 +01:00
Dietmar Maurer 8560fe3e5f src/api2/node/tasks.rs - extract_upid: avoid duplicate error message 2019-12-10 13:45:56 +01:00
Dietmar Maurer 5830c20560 src/bin/proxmox-backup-client.rs: add simple task management cli 2019-12-10 13:43:53 +01:00
Dietmar Maurer 73e57f244e src/backup/datastore.rs - garbage-collection: fix average chunk size 2019-12-10 11:25:29 +01:00