Commit Graph

5382 Commits

Author SHA1 Message Date
Wolfgang Bumiller
4ba7b6099c signalfd cleanup
- add comment about the boxed file descriptor (and others)
- reexport SigSet and Signal for convenience
- remove Result wrapper (only used once)
- enforce drop order of the PollEvented2 struct with respect
  to the boxed fd

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-12 11:07:09 +01:00
Wolfgang Bumiller
b6b012e3c0 add missing mio crate for signalfd
This is what actually provides EventedFd used by tokio.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-12 08:05:59 +01:00
Wolfgang Bumiller
f54c19989c tools: add async signalfd handler
This provides a Stream<Item = siginfo> via nix' signalfd,
by wrapping it in tokio's PollEvented2 struct to allow
polling via tokio's event loop.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-12 08:04:28 +01:00
Dietmar Maurer
d5c34d98c0 src/catar/decoder.rs: simplify public restore API 2019-03-11 14:31:01 +01:00
Dietmar Maurer
8e39232acc src/bin/proxmox-backup-client.rs: strip .didx file extensions 2019-03-11 10:54:02 +01:00
Dietmar Maurer
74cdb52107 src/bin/proxmox-backup-client.rs: include file extension in backupspec 2019-03-11 10:27:28 +01:00
Dietmar Maurer
fc2bf37ead src/catar/decoder.rs: cleanup style 2019-03-11 08:14:28 +01:00
Dietmar Maurer
656b23e107 src/catar/decoder.rs: dir_mkdirat - add create_new flag 2019-03-11 07:27:45 +01:00
Dietmar Maurer
e9c9409a99 src/catar/decoder.rs: implement real sequential decoder (no Seek)
I copied the old code to src/catar/inspector.rs. Will modify
that later to implement a random access decoder ...
2019-03-08 16:55:54 +01:00
Dietmar Maurer
eed6db3923 src/bin/proxmox-backup-client.rs: impl option all-file-systems 2019-03-08 09:36:40 +01:00
Wolfgang Bumiller
06178f13fa move chunker into proxmox_protocol
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-08 09:29:47 +01:00
Dietmar Maurer
e3c30c50a6 src/bin/catar.rs: implement all-file-systems option 2019-03-08 09:28:12 +01:00
Dietmar Maurer
65092b1e27 src/catar/encoder.rs: log skipped mount points 2019-03-08 09:25:00 +01:00
Dietmar Maurer
6b64d25d64 src/catar/encoder.rs: remove debug output 2019-03-08 08:23:07 +01:00
Dietmar Maurer
2689810c92 src/bin/catar.rs: implement verbose flags 2019-03-08 08:20:56 +01:00
Dietmar Maurer
79c281fdac src/catar/encoder.rs: use simply flag "all_file_systems" 2019-03-08 08:14:26 +01:00
Wolfgang Bumiller
181cb6401d protocol: use size_t for c api instead of ulong
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 14:40:15 +01:00
Wolfgang Bumiller
b4844eb334 protocol: expose chunker and digest function
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 14:32:42 +01:00
Wolfgang Bumiller
e402769332 protocol: allow explicitly polling for a single packet
When using *blocking* I/O wait_for_* functions need to be
able to not read past their awaited packet.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 13:51:13 +01:00
Wolfgang Bumiller
4932843923 protocol: also build a cdylib
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 13:51:13 +01:00
Wolfgang Bumiller
b08b44c046 protocol: remove redundant WouldBlock handling
The packet reading code already translates this to a bool.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 13:51:13 +01:00
Dietmar Maurer
d721a688d0 Makefile: copy zstd-sys into build 2019-03-07 12:57:04 +01:00
Dietmar Maurer
4203908a9e depend on zstd 1.3.8
On debiln  stretch, you need to install that from debian backuports ...
2019-03-07 12:53:19 +01:00
Wolfgang Bumiller
d04c67b8a9 cargo: patch zstd-sys to use system library
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 12:18:38 +01:00
Wolfgang Bumiller
cd3b9a068f Revert "TEMP: dynamically link against liblz4 for testing"
This reverts commit dc04ce7fe5.
2019-03-07 12:18:38 +01:00
Dietmar Maurer
25e77d3877 src/cli/command.rs: print_bash_completion - avoid crash 2019-03-07 12:14:26 +01:00
Dietmar Maurer
141f062e08 src/backup/chunk_store.rs: use zstd compression insteadf of lz4
Provides better compressionm rate, and is still fast.
2019-03-07 11:42:59 +01:00
Dietmar Maurer
d2690f74bb src/backup/chunk_store.rs: read_chunk - clear buffer before calling read_to_end 2019-03-07 10:40:01 +01:00
Wolfgang Bumiller
dc04ce7fe5 TEMP: dynamically link against liblz4 for testing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 08:44:32 +01:00
Dietmar Maurer
2ae7d196b9 src/bin/proxmox-backup-client.rs: correctly strip file extension 2019-03-06 11:18:46 +01:00
Dietmar Maurer
9f91249351 src/bin/proxmox-backup-client.rs: impl restore 2019-03-06 11:02:08 +01:00
Dietmar Maurer
01a1342364 src/api2/admin/datastore.rs: impl list_snapshot_files 2019-03-06 11:02:08 +01:00
Dietmar Maurer
58e99e138e src/backup/backup_info.rs: new helper to list files 2019-03-06 11:02:08 +01:00
Dietmar Maurer
dd79265a8a src/api2/admin/datastore/catar.rs: use archive_name directly 2019-03-06 11:02:08 +01:00
Dietmar Maurer
a6b7551311 src/client/http_client.rs: impl download 2019-03-06 11:02:08 +01:00
Wolfgang Bumiller
c28e6f4b13 buildsys: copy proxmox-protocol to build/
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 09:39:30 +00:00
Wolfgang Bumiller
6716f30bbc add protocol test client
This uses futures for everything which is mostly useful as a
test to see if the protocol crate's non-blocking I/O support
can handle it...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:26:12 +01:00
Wolfgang Bumiller
e2d007f76e api2/admin/datastore: add a backup protocol test api path
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:26:12 +01:00
Wolfgang Bumiller
ac4e349b5e import proxmox-protocol crate
This is supposed to contain only the parts necessary to
communicate with the server via the proxmox backup protocol.
(Including the chunker, which is currently `include!()`d
from the main crate.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:26:10 +01:00
Wolfgang Bumiller
e3062f87b1 fixed_index: split add_chunk/add_digest
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:25:20 +01:00
Wolfgang Bumiller
c3bb97e59c fixed_index: impl Send for FixedIndexWriter
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:25:20 +01:00
Wolfgang Bumiller
3b7ade9e78 backup/datastore: expose insert_chunk method
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:25:20 +01:00
Wolfgang Bumiller
91ebea8262 router: add upgrade method
This is just an Async GET method, but semantically
different, so it gets its own router method.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:25:20 +01:00
Dietmar Maurer
80822b95b1 src/bin/proxmox-backup-client.rs: sort list results 2019-03-06 07:20:51 +01:00
Dietmar Maurer
fba30411fb src/bin/proxmox-backup-client.rs: allow to set backup-id 2019-03-06 07:02:52 +01:00
Dietmar Maurer
21ea0158b4 src/client/http_client.rs: remove debug statement 2019-03-06 06:45:51 +01:00
Dietmar Maurer
d49746481c docs: remove generated-index.rst and search-page.rst
This does not work as expected.
2019-03-05 18:36:22 +01:00
Dietmar Maurer
b933ed7f80 docs: add manual page for proxmox-backup-proxy 2019-03-05 18:14:48 +01:00
Dietmar Maurer
b246b2a635 docs: define author and version inside epilog.rst 2019-03-05 17:42:48 +01:00
Dietmar Maurer
ba3a60b2a4 src/client/http_client.rs: store/load ticket in xdg runtime dir, depend on crate xdg 2019-03-05 12:56:21 +01:00