]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
4 years agosrc/client/backup_writer.rs: move BackupClient code into extra file
Dietmar Maurer [Sat, 12 Oct 2019 11:53:11 +0000 (13:53 +0200)]
src/client/backup_writer.rs: move BackupClient code into extra file

And rename it to BackupWriter.

4 years agosrc/client/backup_reader.rs: add documentation
Dietmar Maurer [Sat, 12 Oct 2019 11:26:47 +0000 (13:26 +0200)]
src/client/backup_reader.rs: add documentation

4 years agosrc/client/backup_reader.rs: split BackupReader code into separate file
Dietmar Maurer [Sat, 12 Oct 2019 10:57:08 +0000 (12:57 +0200)]
src/client/backup_reader.rs: split BackupReader code into separate file

4 years agosrc/bin/proxmox-backup-client.rs: pass verbose flag to dump_image
Dietmar Maurer [Tue, 8 Oct 2019 11:04:10 +0000 (13:04 +0200)]
src/bin/proxmox-backup-client.rs: pass verbose flag to dump_image

And print some useful status to stderr.

4 years agofix typo in error message
Dietmar Maurer [Mon, 7 Oct 2019 10:48:56 +0000 (12:48 +0200)]
fix typo in error message

4 years agosrc/api2/reader.rs: use tokio::fs::read() to read file async
Dietmar Maurer [Mon, 7 Oct 2019 10:24:06 +0000 (12:24 +0200)]
src/api2/reader.rs: use tokio::fs::read() to read file async

4 years agosrc/backup/data_blob.rs: avoid Arc<CryptConfig>
Dietmar Maurer [Mon, 7 Oct 2019 09:36:39 +0000 (11:36 +0200)]
src/backup/data_blob.rs: avoid Arc<CryptConfig>

use simple reference instead.

4 years agoremove DataChunk file format - use DataBlob instead
Dietmar Maurer [Sun, 6 Oct 2019 08:31:06 +0000 (10:31 +0200)]
remove DataChunk file format - use DataBlob instead

4 years agocleanup: remove dead code
Dietmar Maurer [Sat, 5 Oct 2019 14:10:41 +0000 (16:10 +0200)]
cleanup: remove dead code

4 years agosrc/bin/proxmox-backup-client.rs: cleanup restore
Dietmar Maurer [Sat, 5 Oct 2019 09:48:51 +0000 (11:48 +0200)]
src/bin/proxmox-backup-client.rs: cleanup restore

- write directly to /dev/stdout (instead of using stdout line writer)
- avoid BufferedFixedReader

4 years agosrc/client/remote_chunk_reader.rs: pass reference to download_chunk
Dietmar Maurer [Sat, 5 Oct 2019 09:45:20 +0000 (11:45 +0200)]
src/client/remote_chunk_reader.rs: pass reference to download_chunk

Make sure we do not move data around.

4 years agosrc/api2/reader.rs - download_chunk: use blocking io
Dietmar Maurer [Sat, 5 Oct 2019 09:41:19 +0000 (11:41 +0200)]
src/api2/reader.rs - download_chunk: use blocking io

Turns out to be twice as fast as tokio async io...

4 years agosrc/client/http_client.rs: store raw data/blob size in index.json
Dietmar Maurer [Wed, 2 Oct 2019 08:47:20 +0000 (10:47 +0200)]
src/client/http_client.rs: store raw data/blob size in index.json

4 years agosrc/client/http_client.rs: new helper send_upload_request()
Dietmar Maurer [Sat, 28 Sep 2019 16:22:48 +0000 (18:22 +0200)]
src/client/http_client.rs: new helper send_upload_request()

4 years agosrc/backup/fixed_index.rs: do not use offset for checksum
Dietmar Maurer [Mon, 23 Sep 2019 09:30:20 +0000 (11:30 +0200)]
src/backup/fixed_index.rs: do not use offset for checksum

4 years agobackup writer api: verify checksum inside close
Dietmar Maurer [Mon, 23 Sep 2019 08:56:53 +0000 (10:56 +0200)]
backup writer api: verify checksum inside close

4 years agosrc/client/http_client.rs - H2Client::upload: fix parameter order
Dietmar Maurer [Fri, 20 Sep 2019 11:19:55 +0000 (13:19 +0200)]
src/client/http_client.rs - H2Client::upload: fix parameter order

4 years agosrc/client/http_client.rs: add method parameter to H2 upload
Dietmar Maurer [Fri, 20 Sep 2019 10:40:23 +0000 (12:40 +0200)]
src/client/http_client.rs: add method parameter to H2 upload

4 years agosrc/client/http_client.rs: add content type parameter to H2 upload/requets_builder
Dietmar Maurer [Fri, 20 Sep 2019 10:23:06 +0000 (12:23 +0200)]
src/client/http_client.rs: add content type parameter to H2 upload/requets_builder

4 years agosrc/client/http_client.rs: cleanup (rename parameter)
Dietmar Maurer [Fri, 20 Sep 2019 09:57:03 +0000 (11:57 +0200)]
src/client/http_client.rs: cleanup (rename parameter)

4 years agoremove trailing whitespace
Dietmar Maurer [Fri, 20 Sep 2019 06:12:31 +0000 (08:12 +0200)]
remove trailing whitespace

4 years agosrc/bin/proxmox-backup-client.rs: add functionality to mount pxar archive.
Christian Ebner [Thu, 19 Sep 2019 14:33:09 +0000 (16:33 +0200)]
src/bin/proxmox-backup-client.rs: add functionality to mount pxar archive.

This adds the basic functionality to mount an archive stored in a repository
locally via fuse.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/pxar.rs: adapt to new deamonize flag
Christian Ebner [Thu, 19 Sep 2019 14:33:08 +0000 (16:33 +0200)]
src/bin/pxar.rs: adapt to new deamonize flag

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: make verbose flag independent from deamonize by adding this as...
Christian Ebner [Thu, 19 Sep 2019 14:33:07 +0000 (16:33 +0200)]
src/pxar/fuse.rs: make verbose flag independent from deamonize by adding this as new flag

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: refactor Session::new()
Christian Ebner [Thu, 19 Sep 2019 14:33:06 +0000 (16:33 +0200)]
src/pxar/fuse.rs: refactor Session::new()

and add Session::from_decoder() in order to be able to create a fuse session
with a `Decoder` given as argument.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: introduce `Context` in order to add caching.
Christian Ebner [Thu, 19 Sep 2019 12:22:42 +0000 (14:22 +0200)]
src/pxar/fuse.rs: introduce `Context` in order to add caching.

This patch introduces `Context` to hold the decoder, ino_offset and caches for
the attributes and the goodbye table.
By caching, certain callbacks can be handled without the need to read additional
data via the decoder, which improves performance.
The searching of the goodbye table is refactored as well, avoiding recursive
function calls in case of a hash collision.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: fix bug in decoder read
Christian Ebner [Mon, 16 Sep 2019 14:59:31 +0000 (16:59 +0200)]
src/pxar/decoder.rs: fix bug in decoder read

`offset` points to the `PXAR_FILENAME`, therefore read the filename before
the `PXAR_ENTRY`.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/backup/data_chunk.rs: add into_raw()
Dietmar Maurer [Thu, 19 Sep 2019 12:24:17 +0000 (14:24 +0200)]
src/backup/data_chunk.rs: add into_raw()

4 years agoBackupClient: add upload() function
Dietmar Maurer [Thu, 19 Sep 2019 11:59:24 +0000 (13:59 +0200)]
BackupClient: add upload() function

4 years agomake download_chunk_list() public
Dietmar Maurer [Thu, 19 Sep 2019 11:17:23 +0000 (13:17 +0200)]
make download_chunk_list() public

4 years agosrc/client/http_client.rs: add password parameter to HttpClient::new()
Dietmar Maurer [Mon, 16 Sep 2019 10:35:23 +0000 (12:35 +0200)]
src/client/http_client.rs: add password parameter to HttpClient::new()

4 years agopxar: fuse: avoid possible hash collision in lookup by additional checking against...
Christian Ebner [Wed, 11 Sep 2019 15:25:03 +0000 (17:25 +0200)]
pxar: fuse: avoid possible hash collision in lookup by additional checking against filename

The hash of the filename in the goodbye table items allows to quickly compare to
a hashed filename.
Unfortunately, a matching hash is no garantee for matching filenames as hash
collisions are possible.
This patch fixes such possible collisions by further checking the filenames once
a matching hash has been found.
This introduces no significant extra cost (except for the filename comparison)
for cases with matching hashes, as the lookup call has to seek and read the file
attributes (including the filename) anyway.
In cases with hash collision, the next matching item is read and treaded
analogously (what means we need at least one extra seek).
As collisions should be not that frequent, this should be an acceptable penalty.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoclippy: fix access to unaligned buffer in dynamic reader
Wolfgang Bumiller [Wed, 11 Sep 2019 12:50:45 +0000 (14:50 +0200)]
clippy: fix access to unaligned buffer in dynamic reader

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobackup: cleanup unused imports
Wolfgang Bumiller [Wed, 11 Sep 2019 12:46:46 +0000 (14:46 +0200)]
backup: cleanup unused imports

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoclippy: fix access to unaligned buffer
Wolfgang Bumiller [Wed, 11 Sep 2019 12:45:43 +0000 (14:45 +0200)]
clippy: fix access to unaligned buffer

via the newly introduced ReadExt::read_host_value_boxed()
from proxmox::tools::io.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobackup: use static assertion in fixed index reader
Wolfgang Bumiller [Wed, 11 Sep 2019 12:43:25 +0000 (14:43 +0200)]
backup: use static assertion in fixed index reader

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoclippy: don't use clone a double reference
Wolfgang Bumiller [Wed, 11 Sep 2019 12:02:30 +0000 (14:02 +0200)]
clippy: don't use clone a double reference

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobuildsys: add 'make lint'
Wolfgang Bumiller [Wed, 11 Sep 2019 11:59:56 +0000 (13:59 +0200)]
buildsys: add 'make lint'

for now we only activate lints for code that is "outright
wrong"

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoclippy: collapse identical if branches
Wolfgang Bumiller [Wed, 11 Sep 2019 11:57:58 +0000 (13:57 +0200)]
clippy: collapse identical if branches

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agofixup variable naming
Wolfgang Bumiller [Wed, 11 Sep 2019 11:57:21 +0000 (13:57 +0200)]
fixup variable naming

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoclippy: use write_all in file logger
Wolfgang Bumiller [Wed, 11 Sep 2019 11:56:09 +0000 (13:56 +0200)]
clippy: use write_all in file logger

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoclippy: fix pointer to temporary value
Wolfgang Bumiller [Wed, 11 Sep 2019 11:55:56 +0000 (13:55 +0200)]
clippy: fix pointer to temporary value

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoclippy: remove a loop{} which never actually loops
Wolfgang Bumiller [Wed, 11 Sep 2019 10:31:39 +0000 (12:31 +0200)]
clippy: remove a loop{} which never actually loops

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agomore clippy fixups
Wolfgang Bumiller [Wed, 11 Sep 2019 10:23:11 +0000 (12:23 +0200)]
more clippy fixups

mostly indentation changes, view with `-w`

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosome clippy fixups
Wolfgang Bumiller [Wed, 11 Sep 2019 10:06:59 +0000 (12:06 +0200)]
some clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoremove Cargo.lock
Wolfgang Bumiller [Wed, 11 Sep 2019 10:07:33 +0000 (12:07 +0200)]
remove Cargo.lock

we currently have no git dependencies we need to lock into
specific revisions anymore

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/pxar/fuse.rs: s/Buf/ReplyBuf/ and s/BufState/ReplyBufState/
Christian Ebner [Tue, 10 Sep 2019 15:33:15 +0000 (17:33 +0200)]
src/pxar/fuse.rs: s/Buf/ReplyBuf/ and s/BufState/ReplyBufState/

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: refactor stat and fix i-node mapping
Christian Ebner [Tue, 10 Sep 2019 15:14:27 +0000 (17:14 +0200)]
src/pxar/fuse.rs: refactor stat and fix i-node mapping

The functionality of stat is split into smaller sub-functions, which allows
to reuse them more flexible, as the code flow is similar but not always the same.
By this, the ugly and incorrect re-setting of the i-node in the lookup callback
function is avoided.
The correct i-node is now calculated beforehand and stat simply creates a
`libc::stat` struct from the provided parameters.
Also, this fixes incorrect i-node assignments in the readdir callback function.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: impl readdir callback for fuse
Christian Ebner [Mon, 9 Sep 2019 16:27:32 +0000 (18:27 +0200)]
src/pxar/fuse.rs: impl readdir callback for fuse

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: impl readlink callback for fuse
Christian Ebner [Mon, 9 Sep 2019 16:27:31 +0000 (18:27 +0200)]
src/pxar/fuse.rs: impl readlink callback for fuse

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: read_link has to read filename before entry.
Christian Ebner [Mon, 9 Sep 2019 16:27:30 +0000 (18:27 +0200)]
src/pxar/decoder.rs: read_link has to read filename before entry.

The offset points to the start of the item, which is the filename

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: impl opendir callback for fuse
Christian Ebner [Mon, 9 Sep 2019 16:27:29 +0000 (18:27 +0200)]
src/pxar/fuse.rs: impl opendir callback for fuse

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: impl read callback for fuse
Christian Ebner [Mon, 9 Sep 2019 16:27:28 +0000 (18:27 +0200)]
src/pxar/fuse.rs: impl read callback for fuse

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: impl open callback for fuse
Christian Ebner [Mon, 9 Sep 2019 16:27:27 +0000 (18:27 +0200)]
src/pxar/fuse.rs: impl open callback for fuse

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: impl lookup callback for fuse
Christian Ebner [Mon, 9 Sep 2019 16:27:26 +0000 (18:27 +0200)]
src/pxar/fuse.rs: impl lookup callback for fuse

The lookup call checks if the given filename is found in the directory referenced
by the i-node by calclulating the filenames hash and looking it up in the
directories goodbye table.
If found, the entries parameters are returned.
In order to be able to lookup the parent offset by a given file offset in the
readdir callback, this also stores the corresponding values in a HashMap.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: correctly handle hardlinks in `Decoder`s attribute function
Christian Ebner [Mon, 9 Sep 2019 16:27:25 +0000 (18:27 +0200)]
src/pxar/decoder.rs: correctly handle hardlinks in `Decoder`s attribute function

If the attributes are then returned by seeking to the new offset.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: split functionality of list_dir into list_dir and goodbye_table
Christian Ebner [Mon, 9 Sep 2019 16:27:24 +0000 (18:27 +0200)]
src/pxar/decoder.rs: split functionality of list_dir into list_dir and goodbye_table

In order to read the contents of the goodbye table while keeping the
functionality of list_dir in place as is.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: make read_directory_entry usable by fuse
Christian Ebner [Mon, 9 Sep 2019 16:27:23 +0000 (18:27 +0200)]
src/pxar/decoder.rs: make read_directory_entry usable by fuse

... and thereby allow it to read a single directory entry based on the
start and end archive offsets.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: remove `DirectoryEntry` start_offset and end_offset functions
Christian Ebner [Mon, 9 Sep 2019 16:27:22 +0000 (18:27 +0200)]
src/pxar/decoder.rs: remove `DirectoryEntry` start_offset and end_offset functions

... as they are not needed with the latest iteration of the fuse callback
function impl (which never made it into the repos).

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: correctly read, check and skip filename
Christian Ebner [Mon, 9 Sep 2019 16:27:21 +0000 (18:27 +0200)]
src/pxar/decoder.rs: correctly read, check and skip filename

The previous implementation simply skipped over `size` bytes, which is not
correct as size includes also the header.
By relying on `SequentailDecoder`s read_filename function, this is correctly
taken care of plus some more integrity checks.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoavoid injecting ENV vars from Makefile
Dietmar Maurer [Mon, 9 Sep 2019 08:51:08 +0000 (10:51 +0200)]
avoid injecting ENV vars from Makefile

So that we can run "cargo build" without setting vars manually.

4 years agosrc/pxar/fuse.rs: impl getattr callback for fuse
Christian Ebner [Fri, 6 Sep 2019 09:38:28 +0000 (11:38 +0200)]
src/pxar/fuse.rs: impl getattr callback for fuse

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: Refactor run_in_context and remove inode_to_offset and offset_to_inode
Christian Ebner [Fri, 6 Sep 2019 09:38:27 +0000 (11:38 +0200)]
src/pxar/fuse.rs: Refactor run_in_context and remove inode_to_offset and offset_to_inode

as their functionality is used only once so it makes more sense to keep them
inline.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: Improve comments, add rustfmt skip tag and reafctor
Christian Ebner [Fri, 6 Sep 2019 09:38:26 +0000 (11:38 +0200)]
src/pxar/fuse.rs: Improve comments, add rustfmt skip tag and reafctor

Also, removes an unused println statement in the decoder callback function and
fixes a typo.
Further, use ABI compatible Option<&T> for FFI to avoid use of raw pointers.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agoupdate hyper & h2 to alpha releases on crates.io
Wolfgang Bumiller [Fri, 6 Sep 2019 08:12:24 +0000 (10:12 +0200)]
update hyper & h2 to alpha releases on crates.io

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/client/http_client.rs: use async for upload_speedtest()
Dietmar Maurer [Fri, 6 Sep 2019 06:55:47 +0000 (08:55 +0200)]
src/client/http_client.rs: use async for upload_speedtest()

4 years agosrc/pxar/decoder.rs: impl functionality needed for fuse implementation
Christian Ebner [Thu, 5 Sep 2019 15:27:58 +0000 (17:27 +0200)]
src/pxar/decoder.rs: impl functionality needed for fuse implementation

Implements functions attributes, open, read, read_link and get_dir
to be used by the fuse implementation which uses file offsets within the archive
as inodes to reference the archives items.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: Add comment for unsolved issue and refactor if statement.
Christian Ebner [Thu, 5 Sep 2019 11:17:40 +0000 (13:17 +0200)]
src/pxar/decoder.rs: Add comment for unsolved issue and refactor if statement.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/client/http_client.rs: simplify send_request
Dietmar Maurer [Thu, 5 Sep 2019 13:07:37 +0000 (15:07 +0200)]
src/client/http_client.rs: simplify send_request

4 years agosrc/client/http_client.rs: use async for h2api_response()
Dietmar Maurer [Thu, 5 Sep 2019 12:56:52 +0000 (14:56 +0200)]
src/client/http_client.rs: use async for h2api_response()

4 years agosrc/client/http_client.rs - download_chunk_list: simplify async code
Dietmar Maurer [Thu, 5 Sep 2019 12:16:45 +0000 (14:16 +0200)]
src/client/http_client.rs - download_chunk_list: simplify async code

4 years agosrc/client/http_client.rs - H2Client: fix error message in download()
Dietmar Maurer [Thu, 5 Sep 2019 11:25:17 +0000 (13:25 +0200)]
src/client/http_client.rs - H2Client: fix error message in download()

4 years agosrc/client/http_client.rs: use async for download_chunk_list
Dietmar Maurer [Thu, 5 Sep 2019 11:12:03 +0000 (13:12 +0200)]
src/client/http_client.rs: use async for download_chunk_list

4 years agosrc/client/http_client.rs - BackupClient: use async
Dietmar Maurer [Thu, 5 Sep 2019 10:55:22 +0000 (12:55 +0200)]
src/client/http_client.rs - BackupClient: use async

4 years agosrc/client/http_client.rs - BackupClient: use async
Dietmar Maurer [Wed, 4 Sep 2019 12:52:19 +0000 (14:52 +0200)]
src/client/http_client.rs - BackupClient: use async

4 years agosrc/client/http_client.rs - BackupReader: use async
Dietmar Maurer [Wed, 4 Sep 2019 11:57:05 +0000 (13:57 +0200)]
src/client/http_client.rs - BackupReader: use async

4 years agosrc/backup/catalog_blob.rs: use write_all() instead of write()
Dietmar Maurer [Thu, 5 Sep 2019 09:40:48 +0000 (11:40 +0200)]
src/backup/catalog_blob.rs: use write_all() instead of write()

To correctly handle interrupted system calls.

4 years agosrc/client/http_client.rs: use async for more functions
Dietmar Maurer [Wed, 4 Sep 2019 10:47:01 +0000 (12:47 +0200)]
src/client/http_client.rs: use async for more functions

4 years agosrc/client/http_client.rs: use async for login()
Dietmar Maurer [Wed, 4 Sep 2019 08:01:46 +0000 (10:01 +0200)]
src/client/http_client.rs: use async for login()

4 years agosrc/client/http_client.rs: use async for credentials
Dietmar Maurer [Wed, 4 Sep 2019 07:57:29 +0000 (09:57 +0200)]
src/client/http_client.rs: use async for credentials

4 years agosrc/bin/proxmox-backup-client.rs: verify blob/catlog checksums
Dietmar Maurer [Wed, 4 Sep 2019 06:47:14 +0000 (08:47 +0200)]
src/bin/proxmox-backup-client.rs: verify blob/catlog checksums

4 years agosrc/pxar/sequential_decoder.rs: make functions needed in non-sequential decoder acces...
Christian Ebner [Tue, 3 Sep 2019 12:14:32 +0000 (14:14 +0200)]
src/pxar/sequential_decoder.rs: make functions needed in non-sequential decoder accessible from within crate

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/format_definitions.rs: move header type in PxarHeader and hash in PxarGoodby...
Christian Ebner [Tue, 3 Sep 2019 12:14:31 +0000 (14:14 +0200)]
src/pxar/format_definitions.rs: move header type in PxarHeader and hash in PxarGoodbyeItem to top of struct

By this it is possible to read and check just the first u64 of the corresponding
structs in order to identify the items.
This is needed for the fuse implementation in order to get entries based on the
archive offset, used as inode.
Directories are referenced by the offset to the goodbye tail while other items
are referenced by the offset of the filename followed by the entry.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: add function to map offset to inode and vice versa
Christian Ebner [Tue, 3 Sep 2019 12:14:30 +0000 (14:14 +0200)]
src/pxar/fuse.rs: add function to map offset to inode and vice versa

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: add getter functions to obtain start/end offsets for directories
Christian Ebner [Tue, 3 Sep 2019 12:14:29 +0000 (14:14 +0200)]
src/pxar/decoder.rs: add getter functions to obtain start/end offsets for directories

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: rustfmt fixups
Christian Ebner [Tue, 3 Sep 2019 11:17:02 +0000 (13:17 +0200)]
src/pxar/decoder.rs: rustfmt fixups

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: refactoring of match statement
Christian Ebner [Tue, 3 Sep 2019 14:17:23 +0000 (16:17 +0200)]
src/bin/proxmox-backup-client.rs: refactoring of match statement

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: code cleanup - factor out some functions
Dietmar Maurer [Tue, 3 Sep 2019 11:31:13 +0000 (13:31 +0200)]
src/bin/proxmox-backup-client.rs: code cleanup - factor out some functions

4 years agosrc/backup.rs: define INDEX_BLOB_NAME here
Dietmar Maurer [Tue, 3 Sep 2019 11:15:44 +0000 (13:15 +0200)]
src/backup.rs: define INDEX_BLOB_NAME here

4 years agosrc/bin/proxmox-backup-client.rs - restore: verify checksums
Dietmar Maurer [Tue, 3 Sep 2019 11:12:16 +0000 (13:12 +0200)]
src/bin/proxmox-backup-client.rs - restore: verify checksums

4 years agosrc/backup/fixed_index.rs: new helper to compute checksum and file size
Dietmar Maurer [Tue, 3 Sep 2019 11:11:45 +0000 (13:11 +0200)]
src/backup/fixed_index.rs: new helper to compute checksum and file size

4 years agosrc/backup/dynamic_index.rs: new helper to compute checksum and file size
Dietmar Maurer [Tue, 3 Sep 2019 11:11:09 +0000 (13:11 +0200)]
src/backup/dynamic_index.rs: new helper to compute checksum and file size

4 years agosrc/client/http_client.rs: fix dynamic index checksum
Dietmar Maurer [Tue, 3 Sep 2019 11:10:18 +0000 (13:10 +0200)]
src/client/http_client.rs: fix dynamic index checksum

4 years agocomment fixup
Wolfgang Bumiller [Tue, 3 Sep 2019 09:17:33 +0000 (11:17 +0200)]
comment fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: add tokio::main() replacement
Wolfgang Bumiller [Tue, 3 Sep 2019 09:16:29 +0000 (11:16 +0200)]
tools: add tokio::main() replacement

to deal with block_on() not allowing blocking()

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoadd WrappedReaderStream test
Wolfgang Bumiller [Tue, 3 Sep 2019 08:05:45 +0000 (10:05 +0200)]
add WrappedReaderStream test

Mostly to just document the rt.block_on() issue with
blocking().

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoMakefile: fixup: remove references to proxmox-protocol
Wolfgang Bumiller [Tue, 3 Sep 2019 06:58:46 +0000 (08:58 +0200)]
Makefile: fixup: remove references to proxmox-protocol

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agomerge fixup
Wolfgang Bumiller [Mon, 2 Sep 2019 13:22:36 +0000 (15:22 +0200)]
merge fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoadd Cargo.lock
Wolfgang Bumiller [Mon, 2 Sep 2019 13:17:03 +0000 (15:17 +0200)]
add Cargo.lock

because we're currently using alpha releases...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoupdate to tokio 0.2.0-alpha.4
Wolfgang Bumiller [Mon, 2 Sep 2019 13:16:21 +0000 (15:16 +0200)]
update to tokio 0.2.0-alpha.4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>