]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
4 years agocatalog: add missing function documentation.
Christian Ebner [Thu, 27 Feb 2020 16:12:57 +0000 (17:12 +0100)]
catalog: add missing function documentation.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agocatalog: introduce is_symlink() to check if DirEntry is a symlink.
Christian Ebner [Thu, 27 Feb 2020 16:12:56 +0000 (17:12 +0100)]
catalog: introduce is_symlink() to check if DirEntry is a symlink.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agocatalog: derive PartEq for equality checks of two DirEntry's.
Christian Ebner [Thu, 27 Feb 2020 16:12:55 +0000 (17:12 +0100)]
catalog: derive PartEq for equality checks of two DirEntry's.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/backup/dynamic_index.rs: Add LruCache for chunks.
Christian Ebner [Thu, 27 Feb 2020 14:56:28 +0000 (15:56 +0100)]
src/backup/dynamic_index.rs: Add LruCache for chunks.

In order to improve non-sequential reads of chunks as e.g. in FUSE.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agocatalog: shell: Introduce clear-selected command.
Christian Ebner [Thu, 27 Feb 2020 13:33:33 +0000 (14:33 +0100)]
catalog: shell: Introduce clear-selected command.

'clear-selected' allows to clear all the match patterns from the list of
patterns for a subsequent restore.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agocatalog: shell: Improve list-selected command.
Christian Ebner [Thu, 27 Feb 2020 13:22:04 +0000 (14:22 +0100)]
catalog: shell: Improve list-selected command.

'list-selected' now shows the filenames matching the patterns for a restore
instead of the patterns themselfs.
The patterns can be displayed by passing the '--pattern' flag.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar::decoder: Return the correct symlink target size.
Christian Ebner [Thu, 27 Feb 2020 13:09:56 +0000 (14:09 +0100)]
pxar::decoder: Return the correct symlink target size.

This eliminates also repeated calls to readlink in fuse, which occur when the
preallocated buffer to store the symlink target path is to small.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoproxmox-backup-client: expose exclude match patterns to cli.
Christian Ebner [Thu, 27 Feb 2020 12:13:12 +0000 (13:13 +0100)]
proxmox-backup-client: expose exclude match patterns to cli.

Allows to pass exclude match patterns to the 'backup' command.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/proxmox-backup-manager.rs: cleanup output handling
Dietmar Maurer [Fri, 28 Feb 2020 06:42:36 +0000 (07:42 +0100)]
src/bin/proxmox-backup-manager.rs: cleanup output handling

4 years agosrc/tools/format.rs: move output rendering code to this new file
Dietmar Maurer [Fri, 28 Feb 2020 06:30:35 +0000 (07:30 +0100)]
src/tools/format.rs: move output rendering code to this new file

4 years agosrc/bin/proxmox-backup-client.rs - list_groups: use format_and_print_result_full()
Dietmar Maurer [Thu, 27 Feb 2020 12:31:23 +0000 (13:31 +0100)]
src/bin/proxmox-backup-client.rs - list_groups: use format_and_print_result_full()

Depend on proxmox 0.1.16-1

4 years agosrc/bin/proxmox-backup-client.rs: use new output formath helpers from proxmox 0.15.1-1
Dietmar Maurer [Thu, 27 Feb 2020 11:41:15 +0000 (12:41 +0100)]
src/bin/proxmox-backup-client.rs: use new output formath helpers from proxmox 0.15.1-1

4 years agosrc/bin/proxmox-backup-client.rs - status: improve alignment
Dietmar Maurer [Thu, 27 Feb 2020 10:38:09 +0000 (11:38 +0100)]
src/bin/proxmox-backup-client.rs - status: improve alignment

4 years agosrc/bin/proxmox-backup-client.rs - status: do not print header
Dietmar Maurer [Thu, 27 Feb 2020 10:31:05 +0000 (11:31 +0100)]
src/bin/proxmox-backup-client.rs - status: do not print header

4 years agosrc/bin/proxmox-backup-client.rs - list_snapshots: use format_and_print_result_full()
Dietmar Maurer [Thu, 27 Feb 2020 10:27:44 +0000 (11:27 +0100)]
src/bin/proxmox-backup-client.rs - list_snapshots: use format_and_print_result_full()

Depend on proxmox v0.1.14.

4 years agotools::lru_cache: Improve access() and insert() by using HashMap::entry().
Christian Ebner [Tue, 25 Feb 2020 17:45:28 +0000 (18:45 +0100)]
tools::lru_cache: Improve access() and insert() by using HashMap::entry().

entry() allows to lookup the position where and entry belongs and update/insert
it in the HashMap more efficiently than get_mut() and insert().
Details: https://gankra.github.io/blah/hashbrown-insert/

In addition, use the struct LinkedList and remove the outdated code.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agotools::lru_cache: Separate LinkedList part of LruCache into own struct.
Christian Ebner [Tue, 25 Feb 2020 17:45:27 +0000 (18:45 +0100)]
tools::lru_cache: Separate LinkedList part of LruCache into own struct.

In order to keep the separation more aparent and avoid mut borrow conflics.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agotools::lru_cache: Make key generic.
Christian Ebner [Tue, 25 Feb 2020 17:45:26 +0000 (18:45 +0100)]
tools::lru_cache: Make key generic.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agocatalog: shell: Improve output of stat command.
Christian Ebner [Wed, 26 Feb 2020 16:14:19 +0000 (17:14 +0100)]
catalog: shell: Improve output of stat command.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoAdd zsh completion scripts
Christian Ebner [Tue, 25 Feb 2020 12:56:39 +0000 (13:56 +0100)]
Add zsh completion scripts

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs - list_snapshot_files: use format_and_print_result_f...
Dietmar Maurer [Wed, 26 Feb 2020 12:49:47 +0000 (13:49 +0100)]
src/bin/proxmox-backup-client.rs - list_snapshot_files: use format_and_print_result_full()

4 years agosrc/bin/proxmox-backup-client.rs - status: use format_and_print_result_full
Dietmar Maurer [Wed, 26 Feb 2020 12:29:00 +0000 (13:29 +0100)]
src/bin/proxmox-backup-client.rs - status: use format_and_print_result_full

4 years agosrc/bin/proxmox-backup-manager.rs: use crate::tools::runtime::block_on()
Dietmar Maurer [Wed, 26 Feb 2020 10:37:38 +0000 (11:37 +0100)]
src/bin/proxmox-backup-manager.rs: use crate::tools::runtime::block_on()

4 years agosrc/tools/runtime.rs: call OPENSSL_thread_stop to avoid race with openssl cleanup...
Dietmar Maurer [Wed, 26 Feb 2020 09:38:55 +0000 (10:38 +0100)]
src/tools/runtime.rs: call OPENSSL_thread_stop to avoid race with openssl cleanup handlers

4 years agosrc/client/backup_writer.rs: also print archive size
Dietmar Maurer [Tue, 25 Feb 2020 13:11:36 +0000 (14:11 +0100)]
src/client/backup_writer.rs: also print archive size

4 years agocleanup unused module
Wolfgang Bumiller [Tue, 25 Feb 2020 10:35:35 +0000 (11:35 +0100)]
cleanup unused module

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agodocs: add documentation for pxar
Christian Ebner [Thu, 20 Feb 2020 17:55:29 +0000 (18:55 +0100)]
docs: add documentation for pxar

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: Change text of warning for files matched by exclude patterns.
Christian Ebner [Thu, 20 Feb 2020 13:29:13 +0000 (14:29 +0100)]
pxar: Change text of warning for files matched by exclude patterns.

In addition to the .pxarexclude files, glob match patterns can be passed to pxar
also via cli parameters.
Therefore the warning is rephrased to be more ambiguous.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/client/backup_writer.rs: prefix upload stats with archive name
Dietmar Maurer [Mon, 24 Feb 2020 12:24:46 +0000 (13:24 +0100)]
src/client/backup_writer.rs: prefix upload stats with archive name

4 years agosrc/client/backup_writer.rs: implement verbose options
Dietmar Maurer [Mon, 24 Feb 2020 11:48:40 +0000 (12:48 +0100)]
src/client/backup_writer.rs: implement verbose options

4 years agosrc/client/backup_writer.rs: reduce verbosity
Dietmar Maurer [Mon, 24 Feb 2020 10:33:00 +0000 (11:33 +0100)]
src/client/backup_writer.rs: reduce verbosity

4 years agodocs: fix typo
Christian Ebner [Wed, 19 Feb 2020 15:36:59 +0000 (16:36 +0100)]
docs: fix typo

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agodocs: Add documentation for .pxarexclude files
Christian Ebner [Wed, 19 Feb 2020 15:32:39 +0000 (16:32 +0100)]
docs: Add documentation for .pxarexclude files

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/backup/backup_info.rs: fix SNAPSHOT_PATH_REGEX and GROUP_PATH_REGEX
Dietmar Maurer [Tue, 18 Feb 2020 12:16:35 +0000 (13:16 +0100)]
src/backup/backup_info.rs: fix SNAPSHOT_PATH_REGEX and GROUP_PATH_REGEX

4 years agoruntime: fix blocking strategy:
Wolfgang Bumiller [Mon, 17 Feb 2020 08:48:22 +0000 (09:48 +0100)]
runtime: fix blocking strategy:

- do not "double"-block_in_place() (it may not be nested)
- do not call block_in_place() in non-worker threads

is_in_tokio() isn't sufficient, we need to actually know
that we're in a worker-thread, so we do this by remembering
that we're blocking.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoruntime: remove IN_TOKIO thread local variable
Wolfgang Bumiller [Thu, 13 Feb 2020 07:56:37 +0000 (08:56 +0100)]
runtime: remove IN_TOKIO thread local variable

tokio now has Handle::try_current() allowing us to
generally check for a tokio runtime even if spawned by
someone else

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoadministration-guide.rst: documnet new PBS_FINGERPRINT env var
Dietmar Maurer [Tue, 11 Feb 2020 11:06:02 +0000 (12:06 +0100)]
administration-guide.rst: documnet new PBS_FINGERPRINT env var

4 years agosrc/client/http_client.rs: do not store fingerprints passed via options in cache
Dietmar Maurer [Tue, 11 Feb 2020 10:54:43 +0000 (11:54 +0100)]
src/client/http_client.rs: do not store fingerprints passed via options in cache

4 years agosrc/client/http_client.rs: always convert fingerprint to lowercase
Dietmar Maurer [Tue, 11 Feb 2020 10:37:24 +0000 (11:37 +0100)]
src/client/http_client.rs: always convert fingerprint to lowercase

4 years agosrc/client/http_client.rs: remove useless password_env
Dietmar Maurer [Tue, 11 Feb 2020 10:10:13 +0000 (11:10 +0100)]
src/client/http_client.rs: remove useless password_env

4 years agosrc/bin/proxmox-backup-client.rs: allows to pass fingerprint via env vars
Dietmar Maurer [Tue, 11 Feb 2020 10:01:57 +0000 (11:01 +0100)]
src/bin/proxmox-backup-client.rs: allows to pass fingerprint via env vars

4 years agos/pbsbanner/proxmox-backup-banner/ + move to /usr/lib
Thomas Lamprecht [Mon, 10 Feb 2020 13:43:26 +0000 (14:43 +0100)]
s/pbsbanner/proxmox-backup-banner/ + move to /usr/lib

We want to avoid pbs if possible and also avoid placing internal
binaries, not intended for human direct use, in /bin or /sbin paths.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopbsbanner: use match and also return error
Thomas Lamprecht [Fri, 7 Feb 2020 17:30:41 +0000 (18:30 +0100)]
pbsbanner: use match and also return error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd login banner service
Thomas Lamprecht [Thu, 6 Feb 2020 21:08:07 +0000 (22:08 +0100)]
add login banner service

Modeled after the one from PVE, but using rust instead of perl for
resolving the nodename and writing to /etc/issue

Behavior differs a bit. We write all non-loopback addresses to this
file, as the gui accepts connections from them all, so limiting it to
the first one is not really sensible.
Further an error to resolve, or only getting loopback addresses won't
write out an empty /etc/issue file, but a note about the error at the
place where the address would be displayed.

Named it "pbsbanner", not "proxmox-backup-banner" as it's rather an
internal tool anyway and mirrors pvebanner, pmgbanner

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocatalog: shell: Allow two or more successive slashes in path.
Christian Ebner [Tue, 4 Feb 2020 12:37:03 +0000 (13:37 +0100)]
catalog: shell: Allow two or more successive slashes in path.

Two or more successive slashes should be allowed and treated as a single slash.
We also do not treat two successive slashes at the beginning of a path any
different.

Details are found here:
https://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar::fuse: cleanup: Remove unused code.
Christian Ebner [Mon, 3 Feb 2020 12:34:50 +0000 (13:34 +0100)]
pxar::fuse: cleanup: Remove unused code.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar::fuse: Refactor lookup in order to cache accessed entries.
Christian Ebner [Mon, 3 Feb 2020 12:34:49 +0000 (13:34 +0100)]
pxar::fuse: Refactor lookup in order to cache accessed entries.

Context::find_goodbye_entry() is removed and incorporated into the lookup
callback in order to take advantage of the entry_cache and since it is only used
inside this callback.
All entries read on lookup are cached.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar: Improve read performance for fuse.
Christian Ebner [Mon, 3 Feb 2020 10:21:28 +0000 (11:21 +0100)]
pxar: Improve read performance for fuse.

By storing the payload start offset in the `DirectoryEntry` and passing this
information to `Decoder::read()`, the payload can be read directly and a repeated
re-reading of the entry information is avoided.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: do not use api macro for prune
Dietmar Maurer [Fri, 31 Jan 2020 09:31:00 +0000 (10:31 +0100)]
src/bin/proxmox-backup-client.rs: do not use api macro for prune

So that we can use add_common_prune_prameters!() macro again.

4 years agosrc/config/remote.rs: do not serialize empty option
Dietmar Maurer [Fri, 31 Jan 2020 08:09:24 +0000 (09:09 +0100)]
src/config/remote.rs: do not serialize empty option

4 years agosrc/section_config.rs - write: improve error message
Dietmar Maurer [Fri, 31 Jan 2020 08:08:42 +0000 (09:08 +0100)]
src/section_config.rs - write: improve error message

4 years agodepend on proxmox 0.1.13, use new tty helpers from there
Dietmar Maurer [Fri, 31 Jan 2020 07:16:00 +0000 (08:16 +0100)]
depend on proxmox 0.1.13, use new tty helpers from there

4 years agodocs: fix typos
Christian Ebner [Thu, 30 Jan 2020 13:19:09 +0000 (14:19 +0100)]
docs: fix typos

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agodocs: Add documentation for mounting pxar archives via FUSE.
Christian Ebner [Thu, 30 Jan 2020 13:19:08 +0000 (14:19 +0100)]
docs: Add documentation for mounting pxar archives via FUSE.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoproxmox-backup-client: add missing prune options to api definition.
Christian Ebner [Wed, 29 Jan 2020 15:34:07 +0000 (16:34 +0100)]
proxmox-backup-client: add missing prune options to api definition.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoupdate proxmox dependency to 0.1.12
Dietmar Maurer [Fri, 31 Jan 2020 05:59:17 +0000 (06:59 +0100)]
update proxmox dependency to 0.1.12

4 years agosrc/bin/proxmox-backup-manager.rs: remove stale debug comment
Dietmar Maurer [Thu, 30 Jan 2020 16:59:13 +0000 (17:59 +0100)]
src/bin/proxmox-backup-manager.rs: remove stale debug comment

4 years agosrc/bin/proxmox-backup-manager.rs - list remotes: do not use client, call directly
Dietmar Maurer [Thu, 30 Jan 2020 16:57:37 +0000 (17:57 +0100)]
src/bin/proxmox-backup-manager.rs - list remotes: do not use client, call directly

4 years agosrc/bin/proxmox-backup-manager.rs: use new texdt table formatter
Dietmar Maurer [Thu, 30 Jan 2020 12:29:39 +0000 (13:29 +0100)]
src/bin/proxmox-backup-manager.rs: use new texdt table formatter

4 years agosrc/api2/node/tasks.rs; make list_tasks public
Dietmar Maurer [Thu, 30 Jan 2020 12:28:25 +0000 (13:28 +0100)]
src/api2/node/tasks.rs; make list_tasks public

4 years agofixup
Dietmar Maurer [Thu, 30 Jan 2020 12:30:54 +0000 (13:30 +0100)]
fixup

4 years agosrc/section_config.rs - convert_to_array: add option to skip properties
Dietmar Maurer [Thu, 30 Jan 2020 12:26:46 +0000 (13:26 +0100)]
src/section_config.rs - convert_to_array: add option to skip properties

4 years agodocs: Extend documentation on interactive restore with catalog shell.
Christian Ebner [Wed, 29 Jan 2020 14:14:38 +0000 (15:14 +0100)]
docs: Extend documentation on interactive restore with catalog shell.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agodocs: s/RUST/Rust/
Christian Ebner [Wed, 29 Jan 2020 14:14:37 +0000 (15:14 +0100)]
docs: s/RUST/Rust/

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar::fuse: Do not return fcaps value on listxattr.
Christian Ebner [Tue, 28 Jan 2020 11:42:25 +0000 (12:42 +0100)]
pxar::fuse: Do not return fcaps value on listxattr.

listxattr must only return the name list, no extended attribute values.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar::fuse: return ACL names in listxattr if present
Christian Ebner [Tue, 28 Jan 2020 11:42:24 +0000 (12:42 +0100)]
pxar::fuse: return ACL names in listxattr if present

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar::fuse: add support to read ACLs.
Christian Ebner [Tue, 28 Jan 2020 11:42:23 +0000 (12:42 +0100)]
pxar::fuse: add support to read ACLs.

ACLs are stored separately in the pxar archive. This implements the functionality
needed to read the ACLs and return them as extended attributes in the getxattr
callback.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools::acl: Add helpers to create extended attribute buffer.
Christian Ebner [Tue, 28 Jan 2020 11:42:22 +0000 (12:42 +0100)]
tools::acl: Add helpers to create extended attribute buffer.

This helpers are used to construct the extended attributes values from
the ACLs stored in the pxar archive.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar: move acl helper functions to src/tools/acl.rs
Christian Ebner [Tue, 28 Jan 2020 11:42:21 +0000 (12:42 +0100)]
pxar: move acl helper functions to src/tools/acl.rs

They are not only needed by the pxar::sequential_decoder but also for the fuse
xattr impl, so it makes more sense to have them there.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: LruCache: add dropcheck marker
Wolfgang Bumiller [Tue, 28 Jan 2020 10:34:25 +0000 (11:34 +0100)]
tools: LruCache: add dropcheck marker

See https://doc.rust-lang.org/nomicon/phantom-data.html

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/types.rs: define and use struct TaskListItem
Dietmar Maurer [Tue, 28 Jan 2020 10:22:06 +0000 (11:22 +0100)]
src/api2/types.rs: define and use struct TaskListItem

4 years agosrc/api2/node/tasks.rs: use api macro for list_tasks
Dietmar Maurer [Tue, 28 Jan 2020 09:57:33 +0000 (10:57 +0100)]
src/api2/node/tasks.rs: use api macro for list_tasks

4 years agopxar::fuse: Introduce LRU caching for goodbye table and directory entries.
Christian Ebner [Fri, 24 Jan 2020 10:55:14 +0000 (11:55 +0100)]
pxar::fuse: Introduce LRU caching for goodbye table and directory entries.

The goodbye table of directory entries is cached in a LRU cache to speed up
subsequent accesses.
This is especially important for directories with many entries, as then the
readdirplus callback is called repeatedly because of the limited reply buffer
size.

`DirectoryEntry`s are cached for subsequent access in their own LRU cache,
independent of the goodbye tables.

In order to avoid borrow conflicts, the `Context` provides a fn as_mut_refs
as well as a fn run_with_context_refs.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar::fuse: refactor fn stat
Christian Ebner [Fri, 24 Jan 2020 10:55:13 +0000 (11:55 +0100)]
pxar::fuse: refactor fn stat

By passing `&DirectoryEntry` to stat, the function interface is simplified.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agouse proxmox 0.1.9 with new cli command helpers
Dietmar Maurer [Mon, 27 Jan 2020 17:08:43 +0000 (18:08 +0100)]
use proxmox 0.1.9 with new cli command helpers

4 years agosrc/client/http_client.rs: new password_env option
Dietmar Maurer [Mon, 27 Jan 2020 09:42:19 +0000 (10:42 +0100)]
src/client/http_client.rs: new password_env option

4 years agosrc/client/http_client.rs: new prefix options
Dietmar Maurer [Mon, 27 Jan 2020 08:34:02 +0000 (09:34 +0100)]
src/client/http_client.rs: new prefix options

4 years agosrc/client/http_client.rs: implement fingerprint cache
Dietmar Maurer [Sat, 25 Jan 2020 14:37:34 +0000 (15:37 +0100)]
src/client/http_client.rs: implement fingerprint cache

4 years agosrc/client/http_client.rs: new struct HttpClientOptions
Dietmar Maurer [Sat, 25 Jan 2020 11:18:00 +0000 (12:18 +0100)]
src/client/http_client.rs: new struct HttpClientOptions

4 years agosrc/config/remote.rs: add fingerprint
Dietmar Maurer [Sat, 25 Jan 2020 08:48:39 +0000 (09:48 +0100)]
src/config/remote.rs: add fingerprint

4 years agosrc/api2/types.rs: add CERT_FINGERPRINT_SHA256_SCHEMA
Dietmar Maurer [Fri, 24 Jan 2020 11:00:28 +0000 (12:00 +0100)]
src/api2/types.rs: add CERT_FINGERPRINT_SHA256_SCHEMA

4 years agosrc/bin/proxmox-backup-client.rs: fix another typo in property description
Christian Ebner [Fri, 24 Jan 2020 12:31:46 +0000 (13:31 +0100)]
src/bin/proxmox-backup-client.rs: fix another typo in property description

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: fix typo in property description
Christian Ebner [Fri, 24 Jan 2020 12:07:35 +0000 (13:07 +0100)]
src/bin/proxmox-backup-client.rs: fix typo in property description

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobump proxmox crate version requirement
Wolfgang Bumiller [Fri, 24 Jan 2020 12:43:25 +0000 (13:43 +0100)]
bump proxmox crate version requirement

it contained an important api macro bugfix

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: add access method to LruCache
Christian Ebner [Thu, 23 Jan 2020 17:12:42 +0000 (18:12 +0100)]
tools: add access method to LruCache

This will return a mutable reference just like get_mut, but on a cache miss
it will get and insert the missing value via the fetch method provided via the
Cacher trait.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/admin/datastore.rs - download_file: use BACKUP_ARCHIVE_NAME_SCHEMA for file...
Dietmar Maurer [Thu, 23 Jan 2020 12:49:30 +0000 (13:49 +0100)]
src/api2/admin/datastore.rs - download_file: use BACKUP_ARCHIVE_NAME_SCHEMA for file-name

4 years agosrc/api2/types.rs: define and use api type GarbageCollectionStatus
Dietmar Maurer [Thu, 23 Jan 2020 12:31:52 +0000 (13:31 +0100)]
src/api2/types.rs: define and use api type GarbageCollectionStatus

4 years agosrc/api2/admin/datastore.rs: use api macro for start_garbage_collection
Dietmar Maurer [Thu, 23 Jan 2020 12:01:21 +0000 (13:01 +0100)]
src/api2/admin/datastore.rs: use api macro for start_garbage_collection

4 years agosrc/api2/types.rs: define and use struct StorageStatus
Dietmar Maurer [Thu, 23 Jan 2020 11:42:40 +0000 (12:42 +0100)]
src/api2/types.rs: define and use struct StorageStatus

4 years agosrc/api2/types.rs: define struct BackupContent, and use it with list_snapshot_files
Dietmar Maurer [Thu, 23 Jan 2020 10:16:57 +0000 (11:16 +0100)]
src/api2/types.rs: define struct BackupContent, and use it with list_snapshot_files

4 years agosrc/backup/manifest.rs: check if manifest contains files
Dietmar Maurer [Thu, 23 Jan 2020 10:16:12 +0000 (11:16 +0100)]
src/backup/manifest.rs: check if manifest contains files

4 years agosrc/api2/admin/datastore.rs: use api macro for delete_snapshot
Dietmar Maurer [Thu, 23 Jan 2020 09:16:45 +0000 (10:16 +0100)]
src/api2/admin/datastore.rs: use api macro for delete_snapshot

4 years agosrc/backup/datastore.rs: remove_backup_(group/dir) - return Error instead of io:...
Dietmar Maurer [Thu, 23 Jan 2020 09:14:46 +0000 (10:14 +0100)]
src/backup/datastore.rs: remove_backup_(group/dir) - return Error instead of io::Error

4 years agosrc/api2/pull.rs: delete fanished snapshots
Dietmar Maurer [Thu, 23 Jan 2020 08:58:57 +0000 (09:58 +0100)]
src/api2/pull.rs: delete fanished snapshots

4 years agosrc/backup/datastore.rs: improve error messages
Dietmar Maurer [Thu, 23 Jan 2020 08:58:14 +0000 (09:58 +0100)]
src/backup/datastore.rs: improve error messages

4 years agosrc/api2/pull.rs: use new Datastore::last_successful_backup helper
Dietmar Maurer [Wed, 22 Jan 2020 14:06:28 +0000 (15:06 +0100)]
src/api2/pull.rs: use new Datastore::last_successful_backup helper

Do not fail if local group does not exists.

4 years agosrc/backup/datastore.rs: new helpers
Dietmar Maurer [Wed, 22 Jan 2020 14:04:08 +0000 (15:04 +0100)]
src/backup/datastore.rs: new helpers

last_successful_backup: Returns the time of the last successful backup
group_path: Returns the absolute path for a backup_group
snapshot_path: Returns the absolute path for a backup_dir

4 years agofollowup: commit all changes
Thomas Lamprecht [Wed, 22 Jan 2020 13:14:52 +0000 (14:14 +0100)]
followup: commit all changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi/datastore: do not allow updating path for now
Thomas Lamprecht [Wed, 15 Jan 2020 15:11:44 +0000 (16:11 +0100)]
api/datastore: do not allow updating path for now

It's a bit dangerous as it points to all the saved backups, so they
would be seemingly lost after updating the path.
Follow our logic from other products, e.g. in PVE we do not allow to
update the backing path/location of a storage either for similar
reasons.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agotools: LRU cache to use for pxar FUSE implementation.
Christian Ebner [Tue, 21 Jan 2020 13:21:53 +0000 (14:21 +0100)]
tools: LRU cache to use for pxar FUSE implementation.

Implements a cache with least recently used cache replacement policy.
Internally the state is tracked by a HashMap (for fast access) and a doubly
linked list (for the access order).

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>