Dietmar Maurer
26d3718833
current-api.h: update docs
2020-07-02 07:12:51 +02:00
Dietmar Maurer
c9c4a5788b
make backup C api thread safe
...
Protect everything with a Mutex, so it is now allowed to make parallel
calls from different threads.
2020-07-02 07:01:12 +02:00
Dietmar Maurer
12a00649f7
Revert "avoid mutexes"
...
This reverts commit 96afa3d02c
.
Turns out we cannot guarantee correct locking at caller site ...
2020-07-01 17:01:36 +02:00
Dietmar Maurer
6b674b5d13
improve error message
2020-07-01 13:17:58 +02:00
Dietmar Maurer
18a32972e4
add_config: use Vec<u8> instead of DataPointer
2020-07-01 12:54:22 +02:00
Dietmar Maurer
96afa3d02c
avoid mutexes
2020-07-01 11:16:33 +02:00
Dietmar Maurer
c318755f21
simpletest.c: fix error check
2020-07-01 10:44:10 +02:00
Dietmar Maurer
3e5db190ca
avoid extra worker thread and command channel
2020-07-01 10:29:15 +02:00
Thomas Lamprecht
c4214b4ec2
bump version to 0.2.0-1
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-30 12:27:14 +02:00
Wolfgang Bumiller
1c56dc4822
add tools module
...
with:
* utf8_c_string(ptr) -> Result<Option<String>>
* utf8_c_string_lossy(ptr) -> Option<String>
* unsafe utf8_c_string_lossy_non_null(ptr) -> String
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-30 10:51:40 +02:00
Wolfgang Bumiller
b6e17373fd
add api check
...
commit the current generated proxmox-backup-qemu.h as
'current-api.h' and run `diff -up` between the two in build
steps, so any changes to the C api are caught at build time.
cbindgen seems to be using a BTreeMap for the data, so it
should always come out sorted, so this should be a
stable-enough check.
Link: https://github.com/eqrion/cbindgen/issues/12
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-29 13:14:46 +02:00
Dietmar Maurer
93bc6c3be1
depend on proxmox-backup v0.5.0
2020-06-29 13:06:29 +02:00
Dietmar Maurer
2117056cc1
also upload _dbgsym_ .deb
2020-06-29 09:41:27 +02:00
Dietmar Maurer
49964c2cb6
bump version to 0.1.8-1
2020-06-29 09:36:25 +02:00
Dietmar Maurer
fabeaf9cf1
proxmox_backup_connect: return info about previous backup
2020-06-29 09:34:18 +02:00
Dietmar Maurer
598e872f87
use bool type for incremental flag
2020-06-29 09:02:15 +02:00
Dietmar Maurer
bac8a345dc
simpletest.c: fix compile error
2020-06-26 11:55:17 +02:00
Dietmar Maurer
a78a6778b9
bump version to 0.1.7-1
2020-06-26 11:44:07 +02:00
Dietmar Maurer
d5f033634e
simplify code
2020-06-26 11:37:02 +02:00
Stefan Reiter
cefb437a05
add incremental backup support
...
Tell the server we're doing an incremental backup if QEMU notifies us
with "is_incremental" in register_image. We do this by using the
'reuse-csum' parameter when registering each archive's index, thus
switching the server to incremental mode (where it only expects changed
chunks and verifies the previous backup's checksum).
We use the newly changed API download_previous_fixed_index() to replace
known_chunks generation and also give us the verified index file to
calculate the new checksum with. The manifest for verfication is
downloaded during "Connect".
To initialize the session cache for checksums, lazy_static is used.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-06-26 11:03:05 +02:00
Stefan Reiter
22c6bca881
make compatible with newest proxmox-backup crate
...
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-06-24 10:40:16 +02:00
Thomas Lamprecht
7516d705b9
bump version to 0.1.6-1
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-04 10:48:50 +02:00
Thomas Lamprecht
67cac4a365
update proxmox-backup crate to 0.2.3
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-04 10:48:07 +02:00
Dominik Csapak
391ec76798
fix backing up images that are not multiples of 'chunk_size'
...
by removing the client side checks
since the backup server has to check those things anyway, there is
little benefit of checking it here, but poses a risk that there
are two diverging checks for the client and server
especially the next to last check (end_offset > device_size) was
wrong, since we do not actually check the size of the actual chunk
(which would be 'size'), but the generic set chunk size (defaults to 4M)
which is obviously wrong (the last chunk is probably smaller)
since it is not needed anymore, we can omit to get the 'device_size'
fixes an issue where we could not backup an image which was not
4M aligned (or smaller than 4M altogether)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-04 07:00:06 +02:00
Thomas Lamprecht
5e800b33e7
update proxmox-backup crate to 0.2.2
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-03 17:22:41 +02:00
Dietmar Maurer
eb03d47afd
bump version to 0.1.5-1
2020-06-02 12:18:59 +02:00
Dietmar Maurer
d4db809a8a
src/restore.rs: hold reference to the runtime
2020-06-02 12:16:47 +02:00
Dietmar Maurer
234bd5a47c
avoid compiler warning
2020-06-02 07:42:38 +02:00
Thomas Lamprecht
18e663ce6f
bump version to 0.1.4-1
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-30 18:42:42 +02:00
Thomas Lamprecht
564910b080
restore: reuse the clients download_fixed_index
...
it's the same code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-30 18:42:42 +02:00
Thomas Lamprecht
20f1402e6b
Cargo.toml: update versions
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-30 17:02:37 +02:00
Thomas Lamprecht
3e77a02983
switch from failure to anyhow
...
Similarly to how we did in proxmox-backup in mid april
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-30 17:01:38 +02:00
Dietmar Maurer
569a861e68
bump version to 0.1.3-1
2020-03-11 12:07:02 +01:00
Dietmar Maurer
fc9bf0e863
call C-callback if send command fail
...
And fix previous commit.
2020-03-11 11:11:14 +01:00
Dietmar Maurer
ad78a1a100
cleanup: use macro raise_error_int
2020-03-11 10:36:31 +01:00
Dietmar Maurer
eff15f5748
correctly convert error messages to CString
2020-03-11 10:24:23 +01:00
Dietmar Maurer
091e70b0c8
remove debug statements
...
And print unrecoverable errors to stderr.
2020-03-11 09:35:26 +01:00
Dietmar Maurer
9d60e3ffd3
bump version to 0.1.2-1
2020-03-10 11:22:58 +01:00
Dietmar Maurer
d648f6dcee
build.rs: .with_include_guard("PROXMOX_BACKUP_QEMU_H")
2020-03-10 11:21:16 +01:00
Dietmar Maurer
8128b10d85
Makefile: upload to pve instead of pbs product
2020-03-03 08:04:07 +01:00
Dietmar Maurer
a13913f786
Makefile: add upload target
2020-03-03 07:55:59 +01:00
Dietmar Maurer
61f9fc51b1
depend on specific proxmox-backup git version
2020-03-03 07:49:53 +01:00
Dietmar Maurer
85a695a304
fix compile errors
2020-02-19 13:13:14 +01:00
Dietmar Maurer
36d22ed6a4
set fingerprint and password on HttpClientOptions
2020-02-19 13:07:26 +01:00
Dietmar Maurer
28e0be9f0d
proxmox_restore_connect: use snapshot string (instead of backup_id and backup_time).
2020-02-19 12:47:01 +01:00
Dietmar Maurer
aca3c6a306
use BackupSetup for ProxmoxRestore::new()
2020-02-19 12:31:27 +01:00
Dietmar Maurer
76381310d3
simpletest.c: correctly handle write errors
2020-02-13 12:18:54 +01:00
Dietmar Maurer
9f41dd20bd
remove stale comment
2020-02-13 12:10:04 +01:00
Dietmar Maurer
056dd8fc80
allow to set chunk_size, and define PROXMOX_BACKUP_DEFAULT_CHUNK_SIZE
2020-02-13 12:09:32 +01:00
Dietmar Maurer
070e55bc37
also implement synchrounous c-api and fix simpletest.c
2020-02-13 11:41:14 +01:00