Commit Graph

316 Commits

Author SHA1 Message Date
Dietmar Maurer
3fb097d5f4 proxmox_backup_check_incremental: check if device_name is NULL 2020-07-08 06:37:53 +02:00
Dietmar Maurer
d1099c6fb0 proxmox_backup_abort: check for reason == NULL 2020-07-08 06:35:34 +02:00
Dietmar Maurer
3a3a98e285 bump version to 0.4.0-1 2020-07-07 11:00:15 +02:00
Dietmar Maurer
b364baf8ff use new get_runtime_with_builder 2020-07-07 10:43:38 +02:00
Dietmar Maurer
8fc4b1f92d bump version to 0.3.3-1 2020-07-07 09:49:41 +02:00
Dietmar Maurer
7dd5dfe556 src/commands.rs: avoid useless digest conversions 2020-07-07 09:45:17 +02:00
Dietmar Maurer
d09f5539a6 src/commands.rs: avoid useless lock 2020-07-07 09:41:46 +02:00
Dietmar Maurer
9ac73be061 src/registry.rs: split out Registry code 2020-07-07 09:37:26 +02:00
Dietmar Maurer
fe37a2d64e rename worker_task.rs -> backup.rs 2020-07-07 09:01:43 +02:00
Dietmar Maurer
9285d7ba26 rename ProxmoxRestore into RestoreTask 2020-07-07 08:59:22 +02:00
Dietmar Maurer
ff8f7b8d7c remove pub attribute where not required 2020-07-07 08:21:40 +02:00
Dietmar Maurer
2b00dbce03 src/restore.rs: implement with_runtime 2020-07-07 08:13:14 +02:00
Dietmar Maurer
b960af0485 src/restore.rs: share remote chunk reader 2020-07-07 07:49:53 +02:00
Dietmar Maurer
a88834e08f src/restore.rs: use backup_type from setup 2020-07-07 06:54:34 +02:00
Thomas Lamprecht
7d86d18cb1 bump version to 0.3.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-06 19:54:27 +02:00
Dietmar Maurer
2917839966 src/restore.rs: use OnceCell to avoid locking 2020-07-06 14:08:07 +02:00
Dietmar Maurer
b26a8db3f1 src/worker_task.rs: use OnceCell to avoid locking 2020-07-06 13:54:21 +02:00
Dietmar Maurer
ca590e8fb9 current-api.h: update to include changes from previous commit 2020-07-06 13:31:31 +02:00
Dietmar Maurer
11e42d4a5a add proxmox_backup_check_incremental() api 2020-07-06 13:01:05 +02:00
Dietmar Maurer
3be7064120 current-api.h: update to include changes from previous commit 2020-07-06 12:26:31 +02:00
Dietmar Maurer
6c7a5ca24a proxmox_restore_new: use snapshot string (again) instead of (type, Id, time).
And provide a new helper to create such strings: proxmox_backup_snapshot_string()
2020-07-06 11:38:58 +02:00
Dietmar Maurer
932df89793 add restore data reading API
For accessing existing backups in a VM.
2020-07-06 09:59:18 +02:00
Stefan Reiter
06c101f73f make Registry generic and add ImageAccessInfo
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-07-03 06:40:08 +02:00
Dietmar Maurer
6a125fbc6c bump version to 0.3.1-1 2020-07-02 12:07:45 +02:00
Dietmar Maurer
3b024418cc write_data: return 0 for reused chunks 2020-07-02 10:34:10 +02:00
Dietmar Maurer
0e78f924a9 bump version to 0.3.0-1 2020-07-02 07:43:48 +02:00
Dietmar Maurer
240b35a097 log abort error to stderr 2020-07-02 07:41:47 +02:00
Dietmar Maurer
465e5f75e1 cleanup: remove stale comments 2020-07-02 07:34:47 +02:00
Dietmar Maurer
9aaaafd7b0 make restore api thread safe 2020-07-02 07:28:50 +02:00
Dietmar Maurer
8c1d828c02 cleanup (use better name) 2020-07-02 07:13:29 +02:00
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