]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
4 years agoreplace file_set_contents with replace_file
Wolfgang Bumiller [Wed, 18 Dec 2019 10:05:30 +0000 (11:05 +0100)]
replace file_set_contents with replace_file

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/config/datastore.rs: set protected flags for create/delete API
Dietmar Maurer [Wed, 18 Dec 2019 09:52:45 +0000 (10:52 +0100)]
src/api2/config/datastore.rs: set protected flags for create/delete API

4 years agosrc/api2/config/datastore.rs: fix api docu
Dietmar Maurer [Wed, 18 Dec 2019 09:48:19 +0000 (10:48 +0100)]
src/api2/config/datastore.rs: fix api docu

4 years agosrc/config/datastore.rs: change file owner/permissions
Dietmar Maurer [Wed, 18 Dec 2019 09:41:58 +0000 (10:41 +0100)]
src/config/datastore.rs: change file owner/permissions

owner(root) => read and write
group(backup) => read only

4 years agodatastore: set correct owner on datastore.cfg
Oguz Bektas [Tue, 17 Dec 2019 15:15:25 +0000 (16:15 +0100)]
datastore: set correct owner on datastore.cfg

since manager runs as root, we have to specify backup:root owner while
saving config.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agoui: do not log ticket into console
Thomas Lamprecht [Tue, 17 Dec 2019 14:44:34 +0000 (15:44 +0100)]
ui: do not log ticket into console

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: fixup renewing ticket success calback
Thomas Lamprecht [Tue, 17 Dec 2019 14:42:59 +0000 (15:42 +0100)]
ui: fixup renewing ticket success calback

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agochunk_store: create parent directories
Oguz Bektas [Tue, 17 Dec 2019 14:09:42 +0000 (15:09 +0100)]
chunk_store: create parent directories

'datastore create storename /path/to/dir/that/may/not/exist' should
work.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agobinary_search_tree: add additional doctest for search_binary_tree_by()
Christian Ebner [Tue, 17 Dec 2019 14:01:21 +0000 (15:01 +0100)]
binary_search_tree: add additional doctest for search_binary_tree_by()

Make sure a start indexes larger or equal to the array size results in a return
value of `None`.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agobinary_search_tree: fix off by one error in search_binary_tree_by()
Christian Ebner [Tue, 17 Dec 2019 13:10:40 +0000 (14:10 +0100)]
binary_search_tree: fix off by one error in search_binary_tree_by()

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agocatalog: decoder and shell: fix incorrect logic in find matching
Christian Ebner [Tue, 17 Dec 2019 12:15:45 +0000 (13:15 +0100)]
catalog: decoder and shell: fix incorrect logic in find matching

The find matching was incorrectly performed starting from the parent directroy
and not as intended from the entries of the parent directory.

Further, the match pattern passed from the catalog shell contains the absolute
path of the search entry point as prefix, so find() must always start from the
archive root. This is because the match pattern has to be stored in the selected
list for a subsequent restore-selected command in the shell.
All matching paths are shown as absolute paths with all contents in the subdir,
equal to what would be restored by the given pattern.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoui: show login window if we get a 401 auth exception
Thomas Lamprecht [Tue, 17 Dec 2019 13:45:13 +0000 (14:45 +0100)]
ui: show login window if we get a 401 auth exception

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: re-new ticket every 15 minutes
Thomas Lamprecht [Tue, 17 Dec 2019 13:44:25 +0000 (14:44 +0100)]
ui: re-new ticket every 15 minutes

Like we do it in PVE/PMG

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoproxmox-backup-proxy.service: order after proxmox-backup.service
Thomas Lamprecht [Tue, 17 Dec 2019 12:00:51 +0000 (13:00 +0100)]
proxmox-backup-proxy.service: order after proxmox-backup.service

Ensures we've got the authkey available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agouse proxmox-mini-journalreader to display syslog
Dietmar Maurer [Tue, 17 Dec 2019 13:06:48 +0000 (14:06 +0100)]
use proxmox-mini-journalreader to display syslog

4 years agosrc/api2/node/syslog.rs: use api macro
Dietmar Maurer [Tue, 17 Dec 2019 12:26:14 +0000 (13:26 +0100)]
src/api2/node/syslog.rs: use api macro

4 years agoui: main init: set username info
Thomas Lamprecht [Tue, 17 Dec 2019 12:00:17 +0000 (13:00 +0100)]
ui: main init: set username info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui login: default to root@pam user and focus password field
Thomas Lamprecht [Tue, 17 Dec 2019 10:35:13 +0000 (11:35 +0100)]
ui login: default to root@pam user and focus password field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoinstall ext6-pbs.css
Dietmar Maurer [Tue, 17 Dec 2019 10:34:29 +0000 (11:34 +0100)]
install ext6-pbs.css

4 years agoui: add "Documentation" button to main view
Thomas Lamprecht [Mon, 16 Dec 2019 17:16:06 +0000 (18:16 +0100)]
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>
4 years agoadd CSS file for PBS ExtJS6 basic ui
Thomas Lamprecht [Mon, 16 Dec 2019 17:16:05 +0000 (18:16 +0100)]
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>
4 years agocatalog_shell: impl find for catalog shell.
Christian Ebner [Mon, 16 Dec 2019 11:13:48 +0000 (12:13 +0100)]
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>
4 years agocatalog: impl find() for file search by match pattern.
Christian Ebner [Mon, 16 Dec 2019 11:13:47 +0000 (12:13 +0100)]
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>
4 years agopxar: match_pattern: impl invert() to switch the match type of a MatchPattern.
Christian Ebner [Mon, 16 Dec 2019 11:13:46 +0000 (12:13 +0100)]
pxar: match_pattern: impl invert() to switch the match type of a MatchPattern.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: match_pattern: impl traits needed for MatchPattern to be comparable.
Christian Ebner [Mon, 16 Dec 2019 11:13:45 +0000 (12:13 +0100)]
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>
4 years agopxar: match_pattern: refactor MatchPattern and introduce MatchPatternSlice.
Christian Ebner [Mon, 16 Dec 2019 11:13:44 +0000 (12:13 +0100)]
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>
4 years agodrop Cancellable future in favor of abortable
Wolfgang Bumiller [Tue, 17 Dec 2019 09:52:07 +0000 (10:52 +0100)]
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>
4 years agofix broadcast_future test case
Wolfgang Bumiller [Tue, 17 Dec 2019 09:47:11 +0000 (10:47 +0100)]
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>
4 years agogenerate authkey: public part needs to be readable by backup group
Thomas Lamprecht [Tue, 17 Dec 2019 08:53:21 +0000 (09:53 +0100)]
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>
4 years agohandle_static_file_download: move from and_then to await
Thomas Lamprecht [Tue, 17 Dec 2019 07:56:52 +0000 (08:56 +0100)]
handle_static_file_download: move from and_then to await

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocipherbench: align/format output nicely
Thomas Lamprecht [Tue, 17 Dec 2019 07:49:34 +0000 (08:49 +0100)]
cipherbench: align/format output nicely

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocipherbench: be conform with rfc7539, use 12 byte nonce
Thomas Lamprecht [Tue, 17 Dec 2019 07:45:20 +0000 (08:45 +0100)]
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>
4 years agoui: services-administration: s/pmg/proxmox-backup/
Thomas Lamprecht [Mon, 16 Dec 2019 15:48:50 +0000 (16:48 +0100)]
ui: services-administration: s/pmg/proxmox-backup/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/rules: override dwz helper to avoid build-failure
Thomas Lamprecht [Mon, 16 Dec 2019 15:38:00 +0000 (16:38 +0100)]
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>
4 years agoRevert "d/control: add llvm-dev to build-dependencies"
Thomas Lamprecht [Mon, 16 Dec 2019 14:33:57 +0000 (15:33 +0100)]
Revert "d/control: add llvm-dev to build-dependencies"

llvm-dev was wrong, llvm-config is shipped by llvm package

This reverts commit 2db252aeae236a033e7a0c5b8a613e0eb06126d0.

4 years agod/control: add llvm-dev to build-dependencies
Oguz Bektas [Mon, 16 Dec 2019 14:16:06 +0000 (15:16 +0100)]
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>
4 years agobuildsys: make deb: use --lib for first pass build
Wolfgang Bumiller [Mon, 16 Dec 2019 13:07:14 +0000 (14:07 +0100)]
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>
4 years agosrc/bin/proxmox-backup-client.rs: use #[api] macro
Dietmar Maurer [Mon, 16 Dec 2019 12:34:49 +0000 (13:34 +0100)]
src/bin/proxmox-backup-client.rs: use #[api] macro

4 years agod/control: add rsync to build-dependencies
Thomas Lamprecht [Mon, 16 Dec 2019 10:32:39 +0000 (11:32 +0100)]
d/control: add rsync to build-dependencies

not directly required for

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: add missing build-dependencies
Thomas Lamprecht [Mon, 16 Dec 2019 10:24:51 +0000 (11:24 +0100)]
d/control: add missing build-dependencies

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoclient: use api macro for catalog_shell async fn
Wolfgang Bumiller [Mon, 16 Dec 2019 10:24:42 +0000 (11:24 +0100)]
client: use api macro for catalog_shell async fn

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: use ApiHandler::Async for prune and status
Dietmar Maurer [Mon, 16 Dec 2019 10:00:43 +0000 (11:00 +0100)]
src/bin/proxmox-backup-client.rs: use ApiHandler::Async for prune and status

4 years agosrc/bin/proxmox-backup-client.rs: use new ApiHandler::Async
Dietmar Maurer [Mon, 16 Dec 2019 09:06:26 +0000 (10:06 +0100)]
src/bin/proxmox-backup-client.rs: use new ApiHandler::Async

4 years agosrc/pxar/decoder.rs: require Send
Dietmar Maurer [Mon, 16 Dec 2019 08:58:26 +0000 (09:58 +0100)]
src/pxar/decoder.rs: require Send

4 years agoapi2: update for latest proxmox-api changes
Dietmar Maurer [Mon, 16 Dec 2019 08:59:45 +0000 (09:59 +0100)]
api2: update for latest proxmox-api changes

- rename ApiFuture into ApiResponseFuture
- impl. ApiHandler::Async

4 years agosrc/api2/admin/datastore.rs - prune: log retention options
Dietmar Maurer [Sat, 14 Dec 2019 15:32:16 +0000 (16:32 +0100)]
src/api2/admin/datastore.rs - prune: log retention options

4 years agosrc/api2/admin/datastore.rs: fix prune worker id
Dietmar Maurer [Sat, 14 Dec 2019 15:05:21 +0000 (16:05 +0100)]
src/api2/admin/datastore.rs: fix prune worker id

4 years agodocs/administration-guide.rst: document garbage collection
Dietmar Maurer [Sat, 14 Dec 2019 14:52:25 +0000 (15:52 +0100)]
docs/administration-guide.rst: document garbage collection

4 years agogenerate separate proxmox-backup-docs package
Dietmar Maurer [Fri, 13 Dec 2019 13:14:28 +0000 (14:14 +0100)]
generate separate proxmox-backup-docs package

4 years agoMakefile: add upload target
Dietmar Maurer [Fri, 13 Dec 2019 09:35:43 +0000 (10:35 +0100)]
Makefile: add upload target

4 years agoupdate tests
Wolfgang Bumiller [Fri, 13 Dec 2019 11:33:49 +0000 (12:33 +0100)]
update tests

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agofix cancellable future
Wolfgang Bumiller [Fri, 13 Dec 2019 11:10:04 +0000 (12:10 +0100)]
fix cancellable future

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoupdate to url/percent-encoding to 2.1
Wolfgang Bumiller [Fri, 13 Dec 2019 10:55:52 +0000 (11:55 +0100)]
update to url/percent-encoding to 2.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoupdate a chunk of stuff to the hyper release
Wolfgang Bumiller [Thu, 12 Dec 2019 14:27:07 +0000 (15:27 +0100)]
update a chunk of stuff to the hyper release

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: implement task stop
Dietmar Maurer [Fri, 13 Dec 2019 08:43:08 +0000 (09:43 +0100)]
src/bin/proxmox-backup-client.rs: implement task stop

4 years agosrc/api2/types.rs: use PROXMOX_SAFE_ID_FORMAT instead of FILENAME_FORMAT
Dietmar Maurer [Thu, 12 Dec 2019 13:15:40 +0000 (14:15 +0100)]
src/api2/types.rs: use PROXMOX_SAFE_ID_FORMAT instead of FILENAME_FORMAT

4 years agosrc/api2/types.rs: introduce PROXMOX_SAFE_ID_REGEX, use it for DATASTORE_SCHEMA
Dietmar Maurer [Thu, 12 Dec 2019 11:37:11 +0000 (12:37 +0100)]
src/api2/types.rs: introduce PROXMOX_SAFE_ID_REGEX, use it for DATASTORE_SCHEMA

4 years agosrc/api2/types.rs: factor out DATASTORE_SCHEMA
Dietmar Maurer [Wed, 11 Dec 2019 12:45:23 +0000 (13:45 +0100)]
src/api2/types.rs: factor out DATASTORE_SCHEMA

4 years agosrc/api2/node/tasks.rs: new filter "store" to filter tasks for one store
Dietmar Maurer [Wed, 11 Dec 2019 11:53:34 +0000 (12:53 +0100)]
src/api2/node/tasks.rs: new filter "store" to filter tasks for one store

4 years agopxar: match_pattern: refactor match_filename
Christian Ebner [Tue, 10 Dec 2019 12:01:39 +0000 (13:01 +0100)]
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>
4 years agosrc/backup/catalog_shell.rs: sort output of list-selected
Christian Ebner [Tue, 10 Dec 2019 12:01:38 +0000 (13:01 +0100)]
src/backup/catalog_shell.rs: sort output of list-selected

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/api2/node/tasks.rs: add "running" filter to list only running tasks
Dietmar Maurer [Wed, 11 Dec 2019 09:52:27 +0000 (10:52 +0100)]
src/api2/node/tasks.rs: add "running" filter to list only running tasks

4 years agosrc/api2/node/tasks.rs - extract_upid: avoid duplicate error message
Dietmar Maurer [Tue, 10 Dec 2019 12:45:56 +0000 (13:45 +0100)]
src/api2/node/tasks.rs - extract_upid: avoid duplicate error message

4 years agosrc/bin/proxmox-backup-client.rs: add simple task management cli
Dietmar Maurer [Tue, 10 Dec 2019 12:43:53 +0000 (13:43 +0100)]
src/bin/proxmox-backup-client.rs: add simple task management cli

4 years agosrc/backup/datastore.rs - garbage-collection: fix average chunk size
Dietmar Maurer [Tue, 10 Dec 2019 10:25:29 +0000 (11:25 +0100)]
src/backup/datastore.rs - garbage-collection: fix average chunk size

4 years agosrc/bin/proxmox-backup-client.rs: cleanup - factor out view_task_result()
Dietmar Maurer [Mon, 9 Dec 2019 17:00:22 +0000 (18:00 +0100)]
src/bin/proxmox-backup-client.rs: cleanup - factor out view_task_result()

4 years agocli: avoid useless .into()
Dietmar Maurer [Mon, 9 Dec 2019 16:40:34 +0000 (17:40 +0100)]
cli: avoid useless .into()

This needs latest proxmox-api updates.

4 years agosrc/bin/proxmox-backup-client.rs: remove unnecessary .to_owned()
Dietmar Maurer [Mon, 9 Dec 2019 16:11:48 +0000 (17:11 +0100)]
src/bin/proxmox-backup-client.rs: remove unnecessary .to_owned()

4 years agosrc/bin/proxmox-backup-client.rs - garbage-collection: display task log
Dietmar Maurer [Mon, 9 Dec 2019 12:29:23 +0000 (13:29 +0100)]
src/bin/proxmox-backup-client.rs - garbage-collection: display task log

4 years agosrc/bin/proxmox-backup-client.rs: impl. and use complete_pxar_archive_name
Dietmar Maurer [Mon, 9 Dec 2019 12:14:32 +0000 (13:14 +0100)]
src/bin/proxmox-backup-client.rs: impl. and use complete_pxar_archive_name

4 years agosrc/bin/proxmox-backup-client.rs: impl. catalog sub command
Dietmar Maurer [Mon, 9 Dec 2019 12:07:25 +0000 (13:07 +0100)]
src/bin/proxmox-backup-client.rs: impl. catalog sub command

catalog dump
catalog shell

4 years agosrc/client/task_log.rs: move display_task_log into extra file
Dietmar Maurer [Sun, 8 Dec 2019 10:27:15 +0000 (11:27 +0100)]
src/client/task_log.rs: move display_task_log into extra file

4 years agosrc/api2/admin/datastore.rs: remove test_prune, add dry-run to normal prune
Dietmar Maurer [Sun, 8 Dec 2019 09:59:47 +0000 (10:59 +0100)]
src/api2/admin/datastore.rs: remove test_prune, add dry-run to normal prune

And use display_task_log on the client side.

4 years agosrc/bin/proxmox-backup-client.r - display_task_log: use string range instead of as_bytes
Dietmar Maurer [Sun, 8 Dec 2019 09:25:26 +0000 (10:25 +0100)]
src/bin/proxmox-backup-client.r - display_task_log: use string range instead of as_bytes

4 years agosrc/bin/proxmox-backup-client.r - display_task_log: add new strip_date parameter
Dietmar Maurer [Sun, 8 Dec 2019 09:22:02 +0000 (10:22 +0100)]
src/bin/proxmox-backup-client.r - display_task_log: add new strip_date parameter

4 years agosrc/bin/proxmox-backup-client.rs: new display task log helper
Dietmar Maurer [Sat, 7 Dec 2019 15:11:26 +0000 (16:11 +0100)]
src/bin/proxmox-backup-client.rs: new display task log helper

New helper to display worker task logs. Use it for prune (experimental).

4 years agosrc/server/formatter.rs: impl. new result attribute "active"
Dietmar Maurer [Sat, 7 Dec 2019 14:29:42 +0000 (15:29 +0100)]
src/server/formatter.rs: impl. new result attribute "active"

4 years agosrc/backup/prune.rs: implement --keep-hourly
Dietmar Maurer [Sat, 7 Dec 2019 10:23:33 +0000 (11:23 +0100)]
src/backup/prune.rs: implement --keep-hourly

4 years agodocs/administration-guide.rst: add hint about ISO week date
Dietmar Maurer [Sat, 7 Dec 2019 09:45:43 +0000 (10:45 +0100)]
docs/administration-guide.rst: add hint about ISO week date

4 years agosrc/backup/prune.rs: prune - correctly use iso_week year
Dietmar Maurer [Fri, 6 Dec 2019 18:41:38 +0000 (19:41 +0100)]
src/backup/prune.rs: prune - correctly use iso_week year

4 years agodocs/administration-guide.rst: doc prune --dry-run
Dietmar Maurer [Fri, 6 Dec 2019 18:20:05 +0000 (19:20 +0100)]
docs/administration-guide.rst: doc prune --dry-run

4 years agopxar: fuse: add support for list- and getxattr
Christian Ebner [Fri, 6 Dec 2019 13:31:19 +0000 (14:31 +0100)]
pxar: fuse: add support for list- and getxattr

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: fuse: cache goodbye table for each directory on opendir and release it on relea...
Christian Ebner [Fri, 6 Dec 2019 12:53:38 +0000 (13:53 +0100)]
pxar: fuse: cache goodbye table for each directory on opendir and release it on releasedir

Cache not only the goodbye table for the last directory but for each opened
directory.
The opendir fuse callback will fill the cache with the goodbye table and
releasedir will remove it from the cache.
This should reduce the number of chuncks fetched from the server in some cases.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: fuse: use binary search instead of linear search in goodbye table.
Christian Ebner [Fri, 6 Dec 2019 12:13:18 +0000 (13:13 +0100)]
pxar: fuse: use binary search instead of linear search in goodbye table.

The goodbye table is layed out as binary search tree based on the hash, so use
this to be more efficient when looking up a hash in the table for directories
with a large number of entries.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agodocs/command-syntax.rst: include catalog-shell-synopsis.rst
Dietmar Maurer [Fri, 6 Dec 2019 12:46:02 +0000 (13:46 +0100)]
docs/command-syntax.rst: include catalog-shell-synopsis.rst

4 years agosrc/bin/proxmox-backup-client.rs: white space cleanup
Dietmar Maurer [Fri, 6 Dec 2019 12:35:59 +0000 (13:35 +0100)]
src/bin/proxmox-backup-client.rs: white space cleanup

4 years agosrc/bin/proxmox-backup-client.rs: implement prune --dry-run
Dietmar Maurer [Fri, 6 Dec 2019 12:35:25 +0000 (13:35 +0100)]
src/bin/proxmox-backup-client.rs: implement prune --dry-run

4 years agosrc/api2/admin/datastore.rs: add new api test_prune()
Dietmar Maurer [Fri, 6 Dec 2019 12:06:56 +0000 (13:06 +0100)]
src/api2/admin/datastore.rs: add new api test_prune()

4 years agosrc/api2/admin/datastore.rs: cleanup - move schema defininition in front of rust...
Dietmar Maurer [Fri, 6 Dec 2019 11:36:41 +0000 (12:36 +0100)]
src/api2/admin/datastore.rs: cleanup - move schema defininition in front of rust method

4 years agosrc/api2/admin/datastore.rs: remove prune parameters from status call
Dietmar Maurer [Fri, 6 Dec 2019 11:32:53 +0000 (12:32 +0100)]
src/api2/admin/datastore.rs: remove prune parameters from status call

Not idea why they are added there.

4 years agosrc/backup/prune.rs: add new helper keeps_something()
Dietmar Maurer [Fri, 6 Dec 2019 11:28:31 +0000 (12:28 +0100)]
src/backup/prune.rs: add new helper keeps_something()

4 years agoproxmox-backup-client/man1.rst: include catalog shell commands
Dietmar Maurer [Fri, 6 Dec 2019 09:08:11 +0000 (10:08 +0100)]
proxmox-backup-client/man1.rst: include catalog shell commands

4 years agosrc/bin/dump-catalog-shell-cli.rs: generate catalog shell docs
Dietmar Maurer [Fri, 6 Dec 2019 08:53:14 +0000 (09:53 +0100)]
src/bin/dump-catalog-shell-cli.rs: generate catalog shell docs

4 years agorename catalog_shell_api() into catalog_shell_cli()
Dietmar Maurer [Fri, 6 Dec 2019 08:42:05 +0000 (09:42 +0100)]
rename catalog_shell_api() into catalog_shell_cli()

4 years agosrc/backup/catalog_shell.rs: factor out catalog_shell_api()
Dietmar Maurer [Fri, 6 Dec 2019 08:35:47 +0000 (09:35 +0100)]
src/backup/catalog_shell.rs: factor out catalog_shell_api()

In order to extract documentation ...

4 years agodebian/control: remove libreadline-dev build dependency
Christian Ebner [Thu, 5 Dec 2019 16:29:13 +0000 (17:29 +0100)]
debian/control: remove libreadline-dev build dependency

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/backup/readline.rs: removed in favor of new readline impl
Christian Ebner [Thu, 5 Dec 2019 16:23:22 +0000 (17:23 +0100)]
src/backup/readline.rs: removed in favor of new readline impl

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/backup/catalog_shell.rs: adapt to use API Schema definition and rustyline
Christian Ebner [Thu, 5 Dec 2019 16:23:21 +0000 (17:23 +0100)]
src/backup/catalog_shell.rs: adapt to use API Schema definition and rustyline

This major refactoring of the catalog based shell utilizes the new API macro and
the API Schema as well as rustyline instead of the old GNU readline C API.

The code now has these 3 main components:
 * The `Shell` which handles the readline loop via rustyline.
 * The shell functions defined via the API macro.
 * The `Context` which holds catalog and decoder instances.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/backup/prune.rs: define new struct PruneOptions
Dietmar Maurer [Fri, 6 Dec 2019 07:56:27 +0000 (08:56 +0100)]
src/backup/prune.rs: define new struct PruneOptions

4 years agosrc/backup/backup_info.rs: remove old prune code
Dietmar Maurer [Fri, 6 Dec 2019 07:29:27 +0000 (08:29 +0100)]
src/backup/backup_info.rs: remove old prune code