A utility tool to repack Longhorn backup segments into a single raw disk image file using a mounted filesystem.
Longhorn stores backups as incremental block-segments to optimize storage through deduplication. While longhorn-engine
can restore backups using NFS and S3 filesystem drivers, this tool provides an alternative method using locally mounted filesystems.
- Converts Longhorn backup segments into a single raw disk image
- Works with locally mounted filesystems
- Supports
lz4
andgzip
compression formats
Choose one of these methods:
-
Install from the AUR:
yay -S longhorn-backup-repacker
-
Build from source:
git clone https://github.com/thearyadev/longhorn-backup-repacker cd longhorn-backup-repacker # Build instructions here
-
Download pre-built binary: Visit the releases page
./longhorn-backup-repacker [flags]
Flags:
-backup-root string Path to Longhorn backup root directory
-outfile string Path for the output raw disk image
-target string Name of the volume to restore
./longhorn-backup-repacker \
-backup-root "/path/to/longhorn/backup/root" \
-outfile ./outfile.raw \
-target volume_name
-
Filesystem Support:
- Primary support for
ext4
filesystem - Other filesystems may result in apparently corrupted devices (fixable by zero-filling or filesystem shrinking)
- Primary support for
-
Transport Protocols:
- Does not support NFS or S3
- Works only with locally mounted filesystems
This tool is currently in development and intended for testing purposes only. It was developed through reverse engineering of Longhorn v1.7 backups and may not be compatible with other versions. Use in production environments is not recommended.