hZbackup — verified backup of cold archives
Backup tools compress and deduplicate generically, chunk by chunk. For cold trees — directories that no longer change, which is most of what a long-lived disk holds — a content-aware archiver does better, because it sees the whole tree at once.
hZbackup packs such trees into hyperZip archives, proves that each archive restores bit for bit, and then lets restic, borg or a plain copy back up one file instead of a hundred thousand small ones.
Measured against restic
A real personal archive of 192.6 GiB and 193,158 files, measured against restic at its strongest setting, --compression max:
| content | sample | restic | hZ | hZ vs restic |
|---|---|---|---|---|
| Office documents and PDF | 401 MiB | 368 MiB | 166 MiB | −54.9 % |
| JSON, HTML, CSV, LevelDB | 301 MiB | 34 MiB | 22 MiB | −33.7 % |
| Email (mbox) | 512 MiB | 292 MiB | 237 MiB | −18.8 % |
| Photos (JPEG) | 800 MiB | 794 MiB | 784 MiB | −1.2 % |
| Video (MP4) | 812 MiB | 812 MiB | 812 MiB | 0 % |
Weighted by that archive's file census, the five classes cover 89.9 % of it and come to 6.1 percentage points, about 11.8 GiB less to store and move, of which the mail alone is 4.3 GiB. Video gains nothing, because the video codec already did the work, and the table says so. Every row is produced by a script in the repo and regenerated rather than edited by hand.
What it guarantees
- Nothing counts as backed up until it has been proven to restore. Every pack is followed by a full test that unpacks every block and checks every file against its hash. A failure leaves the previous version in place.
- The source tree is never touched. hZbackup only reads.
- Archives are plain hyperZip archives. Lose this tool and
hz unpackstill restores them, with no custom container and no catalog required. - A restore is checked before it is trusted. The stored sha256 must match, or the restore is refused.
The project is a work in progress and the code is not yet published.