Commit Graph

3483 Commits

Author SHA1 Message Date
7bc1d72778 add IndexFile trait
We want to be able to iterate through digests of index
files, but without always having to distinguish between
dynamic and fixed types, so add a trait we can use as a
trait object.

Unfortunately the iterator needs to yield copies as
iterators cannot yield values with life times when
represented as trait objects (Box<dyn Iterator<Item = ?>>)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-28 15:26:40 +01:00
5be4065baf make FixedIndexReader Send and update comments
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-28 15:26:40 +01:00
fded74d0c7 style: BufferedReader -> BufferedRead
Single-method traits usually use the same name as their
method and aren't usually the 'noun' (which is usually an
implementation of them instead).

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-28 15:26:40 +01:00
8f57971714 src/api2/admin/datastore.rs: implement prune 2019-02-28 12:51:27 +01:00
7e688b7149 docs: improve ducument structure 2019-02-27 18:35:05 +01:00
7ef486ae06 build doc with sphinx 2019-02-27 17:42:31 +01:00
83b7db0209 src/api2/admin/datastore.rs: start prune api
just a dummy for now.
2019-02-27 16:53:17 +01:00
d6b5173689 debian/control: use python3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-27 11:43:34 +00:00
051387143b buildsys: deb: always build locally first
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-27 11:43:34 +00:00
0ffbccce5e rc/server/rest.rs: allow to pass parameters as application/json 2019-02-27 12:37:53 +01:00
f98ea63de2 src/bin/proxmox-backup-client.rs: fix bash completion 2019-02-27 12:37:53 +01:00
741706eefe debian/control: rst2man is in python-docutils
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-27 11:26:53 +00:00
a93cc7c934 debian/control: sort dependencies
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-27 11:26:53 +00:00
87da74c7fd buildsys: copy Cargo.lock to build/
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-27 11:26:53 +00:00
8731e40a7f backup/datastore: create_backup_dir: show if path existed
To enable asserting the creation of a new backup rather than
adding to an existing one.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-27 10:15:36 +01:00
25f1650b71 src/bin/proxmox-backup-client.rs: minor code cleanup 2019-02-27 07:21:57 +01:00
9bc3ddb822 src/cli/command.rs: improve generate_usage_str
correctly format positional array arguments ({<name>}).
2019-02-26 12:40:51 +01:00
ae0be2dda9 src/bin/proxmox-backup-client.rs: allow to upload more that one directory 2019-02-26 12:27:28 +01:00
a477d6889a src/client/http_client.rs: login once, store and reuse ticket/token 2019-02-26 11:59:10 +01:00
d02c2ed701 src/cli/getopts.rs: cleanup, avoid compiler warning 2019-02-26 11:55:06 +01:00
f8dfbb45c0 src/tools.rs: new helper required_array_param() 2019-02-26 08:48:17 +01:00
aaba6faace src/cli/getopts.rs: support positional array arguments 2019-02-26 08:47:34 +01:00
f33fa27307 src/cli/command.rs: improve error message 2019-02-26 08:46:36 +01:00
92a173feb0 src/api_schema/schema.rs: improve ParameterError display function 2019-02-26 07:11:24 +01:00
f661f37427 backup/dynamic_index: split out add_chunk
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-25 13:50:45 +01:00
9ac6ec868a backup/chunk_store: split insert_chunk
The protocol handler will receive chunk data plus a hash
pre-calculated by the client. It will verify the hash before
sending it up to the datastore in order to respond to the
client with an error on a mismatch, so there's no need to
recalculate the hash another time.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-25 13:44:29 +01:00
3a50ddd0c9 backup/chunk_store: mark ChunkIterator as fused
Ranges are FusedIterators and it can be useful to propagate
that property to users.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-25 13:44:29 +01:00
eff25ecaf2 backup/chunk_store: make percentage output optional
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-25 13:44:29 +01:00
d59397e60e backup/datastore: expose chunk_store.get_chunk_iterator
will be used by the protocol handler to iterate over
existing chunks

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-25 13:44:29 +01:00
8eb1203bda src/backup/chunk_stat.rs: log write speed 2019-02-25 13:21:00 +01:00
7e3365554e src/backup/chunk_stat.rs: new struct to track chunk statistics 2019-02-25 12:52:10 +01:00
798f7fa065 src/backup/chunk_store.rs: return info about compressed chunk size
So that we can generate better statistics ..
2019-02-25 11:36:05 +01:00
78216a5ab1 src/backup/chunk_store.rs: use lz4 for compression
And depend on lz4 lib now.
2019-02-25 10:00:28 +01:00
2e05a1ca7d docs/Makefile: fix make dependency 2019-02-24 16:19:39 +01:00
f0b5a3adfa docs/proxmox-backup.rst: start writing docs 2019-02-24 15:52:04 +01:00
bb5c770758 start generating manual pages
Depend on docutils-doc
2019-02-24 10:18:38 +01:00
793b0f4d77 src/cli/command.rs: improve help command completion 2019-02-23 18:07:32 +01:00
6949d91564 src/cli/command.rs: cleanup, avoid array manipulation 2019-02-23 17:50:33 +01:00
9d78d57960 src/cli/command.rs: implement bash completion for help 2019-02-23 17:38:10 +01:00
698d9d4402 src/cli/command.rs: add help command 2019-02-23 15:10:48 +01:00
8b6dd2240d src/cli/command.rs::allow to generate ReST docu 2019-02-23 11:29:18 +01:00
2f3f2bb77f src/cli/command.rs: improve usage imformation 2019-02-22 17:40:37 +01:00
f252ca654c src/backup/chunker.rs: simplify break test
To make it a little bit faster ...
2019-02-22 13:02:11 +01:00
6adb40eefc src/cli/command.rs: start implementing generate_usage_str() 2019-02-22 12:02:59 +01:00
33256db6dd src/cli/command.rs: simplify cli handler 2019-02-22 11:15:10 +01:00
61834c1cbf src/backup/chunker.rs: another try to speedup the chunker 2019-02-22 11:15:10 +01:00
532a69eb04 src/cli/getopts.rs: improve docs 2019-02-21 09:36:52 +01:00
4de0e142a0 cleanup cli library structure 2019-02-21 09:08:03 +01:00
56458d9764 http_client: on a tty, read password if no env var is set
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-20 15:03:34 +01:00
c9b296f117 tools: add tty helper module
with read_password() and stdin_isatty() functions

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-20 14:43:07 +01:00