sourcefrog / conserve

🌲 Robust file backup tool in Rust
Other
252 stars 20 forks source link

Don't reference empty/missing blocks from later backups #223

Closed sourcefrog closed 9 months ago

linear[bot] commented 9 months ago
CON-54 Check for 0-byte block files during backup, and rewrite them

It seems to be a common failure mode 1. When checking if a block already exists, check the length is greater than zero. 2. When reading a basis index, only reuse blocks whose length is greater than zero ## Tests * [ ] Make a backup; truncate a block file; backup the same tree; it should be rewritten and restorable * [ ] There should be a version of this where it matches on block content and also a version where the files are unchanged