4cf0ced950
add LocalDynamicReadAt
...
mostly copied from BufferedDynamicReadAt from proxmox-backup-client
but the reader is wrapped in an Arc in addition to the Mutex
we will use this for local access to a pxar behind a didx file
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-24 07:05:31 +02:00
60f9a6ea8f
src/backup/datastore.rs: add new helpers to load blobs and verify chunks
2020-06-24 06:58:14 +02:00
1090fd4424
src/backup/data_blob.rs: cleanup - improve code reuse
2020-06-24 06:56:48 +02:00
92c3fd2e22
src/backup/chunk_store.rs: allow to read name()
...
This is helpful for logging ...
2020-06-24 06:54:21 +02:00
d6d3b353be
cleanup: implement FromStr for BackupGroup
2020-06-23 08:16:56 +02:00
a67f7d0a07
cleanup: implement FromStr for BackupDir
2020-06-23 08:09:52 +02:00
0b99e5aebc
remove debug prints
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-23 06:33:58 +02:00
f386f512d0
add AsyncReaderStream
...
and replace AsyncIndexReader's stream implementation with that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-23 06:33:31 +02:00
eeaa2c212b
impl Sync for DataBlobReader
...
this is safe for the reason explained in the comment
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-19 08:37:47 +02:00
4a3adc3de8
add AsyncIndexReader
...
implements AsyncRead as well as Stream for an IndexFile and a store
that implements AsyncReadChunk
we can use this to asyncread or stream the content of a FixedIndex or
DynamicIndex
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-19 08:32:33 +02:00
abdb976340
add Display trait to BackupDir
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-19 08:28:35 +02:00
3b62116ce6
implement AsyncReadChunk for LocalChunkReader
...
same as the sync ReadChunk but uses tokio::fs::read instead
of file_get_contents
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-19 07:54:23 +02:00
e181d2f6da
add encrypted info to Manifest
...
we want to save if a file of a backup is encrypted, so that we can
* show that info on the gui
* can later decide if we need to decrypt the backup
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-19 07:35:39 +02:00
bde8e243cf
remove unsafe copy code
...
copy_nonoverlapping is basically a memcpy which can also be done
via copy_from_slice which is not unsafe
(copy_from_slice uses copy_nonoverlapping internally)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-19 06:56:15 +02:00
bb59df9134
catalog: don't panic on invalid file mtimes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 11:25:54 +02:00
4264e52220
reuse some extractor code in catalog shell
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 10:54:54 +02:00
6988b29bdc
use O_EXCL when creating files during extraction
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 10:33:27 +02:00
d30c192589
AsyncReadChunk: require Send
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 09:50:29 +02:00
7a6b549270
dynamic index: make it hard to mess up endianess
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-15 09:19:35 +02:00
57e50fb906
use new Mmap helper for dynamic index
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 13:57:56 +02:00
4d16badf6f
add an AsyncReadChunk trait
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 11:38:21 +02:00
1498659b4e
cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 10:59:34 +02:00
e693818afc
refactor time functions to tools
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 13:31:10 +02:00
26e78a2efb
downgrade some FIXMEs to TODOs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 11:09:23 +02:00
5444fa940b
turn pxar::flags into bitflags, pxar::Flags
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 11:05:53 +02:00
fab2413741
catalog: remove unused SenderWriter
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 10:42:42 +02:00
c443f58b09
switch to external pxar and fuse crates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-08 13:56:58 +02:00
a95a3fb893
fix csum calculation of not 'chunk_size' aligned images
...
the last chunk does not have to be as big as the chunk_size,
just use the already available 'chunk_end' function which does the
correct thing
this fixes restoration of images whose sizes are not a multiple of
'chunk_size' as well
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2020-06-04 10:18:30 +02:00
55919bf141
verify_file: add missing closing parenthesis in error message
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com >
2020-06-03 19:10:01 +02:00
4e14781aec
fix typo
2020-06-03 06:59:43 +02:00
add5861e8d
typo fixes all over the place
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com >
2020-05-30 16:39:08 +02:00
1610c45a86
src/client/pull.rs: also download client.log.blob
2020-05-30 14:51:33 +02:00
96d65fbcd0
cleanup: define/use const for predefined blob file names.
2020-05-30 14:04:15 +02:00
8545480a31
src/bin/proxmox-backup-proxy.rs: add simple task scheduler for garbage collection
2020-05-20 08:59:45 +02:00
07ce44a633
avoid compiler warnings
2020-05-19 07:03:41 +02:00
7b22acd0c2
src/config/network.rs: make it compatible with pve
...
and depend on proxmox 0.1.26
2020-05-07 09:28:25 +02:00
99641a6bbb
garbage_collect: call fail_on_abort to abort GV when requested.
2020-05-05 09:06:34 +02:00
54552dda59
implemnt backup ownership, improve datastore access permissions
2020-04-28 10:22:25 +02:00
f7d4e4b506
switch from failure to anyhow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-04-17 18:43:30 +02:00
cf459b1982
gc: log pending removals
2020-04-06 09:50:40 +02:00
32d192a952
catalog: shell: Use the new logic including resolving symlinks for catalog
...
and remove the old unused code.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:51:01 +01:00
fee5528e59
catalog: shell: introduce new CatalogPathStack to navigate in catalog shell.
...
This is basically a rewrite of the current logic for navigating the catalog,
but in addition allows to follow symlinks.
Following symlinks introduces the issue that generation of canonical paths
(needed in the actual pxar archive) is more complex, as symlinks have to be
resolved and loops avoided.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:50:43 +01:00
4145c36749
catalog: add missing function documentation.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:50:08 +01:00
c2f9149461
catalog: introduce is_symlink() to check if DirEntry is a symlink.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:49:55 +01:00
11ee5c0563
catalog: derive PartEq for equality checks of two DirEntry's.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:49:39 +01:00
536683e73b
src/backup/dynamic_index.rs: Add LruCache for chunks.
...
In order to improve non-sequential reads of chunks as e.g. in FUSE.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:47:16 +01:00
35ddf0b419
catalog: shell: Introduce clear-selected command.
...
'clear-selected' allows to clear all the match patterns from the list of
patterns for a subsequent restore.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:40:55 +01:00
8e464141cf
catalog: shell: Improve list-selected command.
...
'list-selected' now shows the filenames matching the patterns for a restore
instead of the patterns themselfs.
The patterns can be displayed by passing the '--pattern' flag.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-28 08:40:42 +01:00
03f779c6f5
catalog: shell: Improve output of stat command.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com >
2020-02-27 06:53:17 +01:00
8ce49a76da
src/backup/backup_info.rs: fix SNAPSHOT_PATH_REGEX and GROUP_PATH_REGEX
2020-02-18 13:16:35 +01:00