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
11e42d4a5a
add proxmox_backup_check_incremental() api
2020-07-06 13:01:05 +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
Dietmar Maurer
3b024418cc
write_data: return 0 for reused chunks
2020-07-02 10:34:10 +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
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
18a32972e4
add_config: use Vec<u8> instead of DataPointer
2020-07-01 12:54:22 +02:00
Dietmar Maurer
3e5db190ca
avoid extra worker thread and command channel
2020-07-01 10:29:15 +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
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
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
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
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
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
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
Dietmar Maurer
74363b4cdd
update all dependencies
2020-02-12 13:01:20 +01:00
Dietmar Maurer
7977ef8507
avoid clippy warnings
2019-10-26 14:46:01 +02:00
Dietmar Maurer
6abb11b405
proxmox_backup_free_error: test if ptr == NULL
2019-10-25 08:50:38 +02:00
Dietmar Maurer
82c4d21165
make proxmox_backup_register_image async
2019-10-25 06:53:37 +02:00
Dietmar Maurer
602a863955
make proxmox_backup_add_config async
2019-10-25 06:45:59 +02:00
Dietmar Maurer
e44ea5eaad
Add pointer to integer return value for all async functions
2019-10-25 06:36:59 +02:00
Dietmar Maurer
2f3642766d
implement async connect command
2019-10-24 13:52:16 +02:00
Dietmar Maurer
6dd823ebff
proxmox_backup_connect: add keyfile and key_password parameter
2019-10-16 13:46:17 +02:00
Dietmar Maurer
7dfc23db39
proxmox_backup_connect: make password optional
2019-10-16 11:47:45 +02:00
Dietmar Maurer
536e728645
improve docs
2019-10-15 15:16:07 +02:00
Dietmar Maurer
493e03630b
cleanup restore api, allow to restore multiple images
2019-10-15 12:11:22 +02:00
Dietmar Maurer
9cad27bd53
src/restore.rs: implement restore
2019-10-14 13:50:20 +02:00
Dietmar Maurer
b967cabc91
add dummy code for simple restore tasks.
2019-10-12 12:12:31 +02:00
Dietmar Maurer
13586d6452
src/upload_queue.rs: split upload_handler into extra file
2019-09-29 11:08:02 +02:00
Dietmar Maurer
54f17651db
add resonable connect parameters
2019-09-27 11:49:57 +02:00
Dietmar Maurer
e79c467767
move async command implementation to commands.rs
2019-09-24 12:15:57 +02:00
Dietmar Maurer
070dc02497
spli C-API from rest of the code
2019-09-24 11:22:12 +02:00
Dietmar Maurer
c7077bb3ae
src/capi_types.rs: slip types for C api into separate file
2019-09-24 11:08:58 +02:00
Dietmar Maurer
da74982148
rename BackupRepository into BackupSetup
2019-09-24 11:01:40 +02:00
Dietmar Maurer
534da1d4a4
pass known_chunks as argument (no need to store inside ImageUploadInfo)
2019-09-24 10:31:14 +02:00
Dietmar Maurer
249ec8ae0c
upload index.json
2019-09-24 10:25:14 +02:00
Dietmar Maurer
c00eaa4c79
compute index checksum, simplify code
2019-09-23 13:13:17 +02:00
Dietmar Maurer
0c78e6d873
implement add_config
2019-09-22 11:13:06 +02:00