Create live disk/partition backups that are 100% compatible with Redo Rescue, so they can be restored from the official Redo Rescue live CD.
Redo Rescue normally runs offline from its live CD. The goal of this project is to produce
the exact same on-disk format (.redo metadata + split, gzip-compressed partclone
images) from a running system, driven by a saved configuration — so you can take a
backup on demand without rebooting into the live CD, and still restore it with Redo Rescue
if disaster strikes.
⚠️ Status: early development. The format and tooling are being built up step by step. Do not rely on this for critical backups yet.
- Take a Redo Rescue-compatible backup of a live machine (primary target: Gentoo, but kept distribution-independent).
- Drive it from a config file under
/etc/redo-backups/, runnable manually. - Keep restores working from the stock Redo Rescue live CD — no custom restore tooling required.
- A command that, given a saved profile under
/etc/redo-backups/, runs a backup manually. - Output byte-format-compatible with Redo Rescue
version 4.0.0. - Configurable data-consistency strategy for live filesystems (see below).
- Distribution-independent; relies only on standard tools (
partclone,pigz,split,sfdisk,dd,lsblk).
The produced backup matches Redo Rescue: a JSON .redo descriptor plus one or more
*_<dev>_NNN.img chunks per partition (4 GiB partclone images piped through pigz and
split). The format is documented in docs/redo-format.md.
Backups are configured under /etc/redo-backups/:
- one profile per file:
/etc/redo-backups/<profile>.conf; - optional per-profile drop-in directory
/etc/redo-backups/<profile>.conf.d/*.conf, applied in lexical order, with later files overriding earlier ones and the base profile.
A ready-to-edit profile with every setting documented is provided under examples/etc/redo-backups/.
Kernel device names (sda, sda1) are assigned in probe order: adding or removing a
drive can renumber them, and a profile saved months earlier then points somewhere else.
Targets can therefore be named the stable way:
drive = auto # the drive hosting the root filesystem
drive = /dev/disk/by-id/ata-MODEL_SN # or any persistent udev "by-*" symlink
parts = LABEL=root, UUID=…, PARTLABEL=…, PARTUUID=…The TAG=value forms are the same ones fstab uses. Bare kernel names still work, and
mixing the two is allowed. Each reference must match exactly one partition of the
drive: a reference matching none — or several, as duplicate labels do — aborts the run
with the available partitions listed, rather than imaging the wrong device.
When the backup disk is not mounted, its mount point is an ordinary directory of the filesystem beneath it, often the root filesystem of the very drive being backed up. A run therefore refuses a destination stored on the drive it is backing up, through LVM, LUKS or RAID as well, before it writes anything; a missing destination directory is created only after that check. To also catch an unmounted backup disk while a drive other than the root drive is backed up, name the mount point the destination must be on:
dest = /mnt/backup/host
dest_mount = /mnt/backup # refuse the run unless /mnt/backup is mounted and holds destImaging a live, mounted filesystem can capture an inconsistent state, so the strategy is
configurable (consistency = in the profile):
none— image the device as-is. Fast, no requirements, but not crash-consistent.fsfreeze— freeze the partition's filesystem (fsfreeze -f) while imaging, then thaw it. Crash-consistent; briefly blocks writes. Use this for directly-formatted partitions, including btrfs.lvm— for an LVM physical-volume partition. See the note below.
A backup is only useful if the Redo Rescue live CD can restore it, and Redo Rescue
restores at the partition level: it recreates the partition table and writes each
per-partition image back to /dev/<part>. It has no concept of logical volumes. Imaging
LVs individually (e.g. with LVM snapshots) would produce images Redo Rescue cannot
restore.
So for an LVM PV partition, redo-backups keeps the same unit Redo Rescue uses — the
whole PV partition, imaged raw — and makes it consistent by freezing every mounted
filesystem on the PV's logical volumes for the duration of imaging, then thawing them.
The result is crash-consistent and restorable from the live CD. The cost is a full-size
raw image (no free-space skipping) and a brief simultaneous write-freeze of those
filesystems.
There is intentionally no btrfs-snapshot (a btrfs snapshot is a subvolume, not a
block device — use fsfreeze) and no offline/reboot mode (that is just what the Redo
Rescue live CD already does).
These strategies are documented in full in docs/redo-format.md and the example configuration.
Install the latest release with Go 1.26+ (the binary lands in
$(go env GOPATH)/bin, so add that to your PATH):
go install github.com/OrbintSoft/redo-backups/cmd/redo-backup@latestOr build from a checkout:
go build -o redo-backup ./cmd/redo-backupInstall a profile and run it (imaging needs root):
sudo install -D -m 0644 examples/etc/redo-backups/example.conf /etc/redo-backups/example.conf
sudo editor /etc/redo-backups/example.conf # set 'dest', pick a consistency strategy
sudo ./redo-backup run exampleOn success the destination directory contains <id>.redo and the <id>_<dev>_NNN.img
chunks, restorable from the Redo Rescue live CD, and the completion record <id>.complete,
written last: a set without it is one whose run did not finish. A run with an id that
already has a set in the destination replaces that set.
redo-backup list # list available profiles
redo-backup show <profile> # print a profile's resolved config
redo-backup run <profile> # run the backup
redo-backup run <profile> --dry-run # preview the plan, touch nothing
redo-backup check <profile> --max-age 20d # is the newest complete backup recent enough?
redo-backup version | helpUseful flags for run (also available where relevant):
--config-dir <dir>— use a profile directory other than/etc/redo-backups.--dry-run— validate and print the imaging plan without touching disks.- Per-setting overrides:
--dest,--dest-mount,--drive,--parts,--id,--notes,--compressor,--split-size,--consistency. These override the profile and are re-validated. Example:
redo-backup run nightly --dest /mnt/usb --consistency fsfreeze --dry-runA tool that runs before a system update can ask whether the last backup is recent enough, and offer to take one when it is not, without knowing the backup format:
redo-backup check nightly --max-age 20d| Exit | Meaning | Does a backup help? |
|---|---|---|
| 0 | the newest complete backup is younger than --max-age |
not needed |
| 1 | it is older, or there is none | yes |
| 2 | the destination is not available (the backup disk is not mounted, say) | no |
| 3 | any other error, usage errors included | no |
It prints the backup it found and its age. Only sets with a valid completion record
(<id>.complete, see docs/redo-format.md) count: sets
from runs that stopped half way, made before that record existed, or made by Redo Rescue
are ignored. The age comes from the descriptor's timestamp, not from the files'
modification time, which a copy changes. --max-age takes whole numbers with the units
w, d, h and m (minutes, not months), largest first: 20d, 2w, 1d12h.
check only reads, and it decides that the destination is not available the same
way run does. It needs to read the descriptors and records, which run makes
readable by root only, so run it as root.
- Go (to build, or to
go installthe released binary) — produces a single static binary. - Runtime tools on the target system:
partclone.*,pigz,split,coreutils,util-linux(sfdisk,lsblk,blockdev,findmnt,fsfreeze). Thefsfreezeandlvmstrategies usefsfreeze; nothing extra beyondutil-linuxis required.
If this project is useful to you, please consider supporting its development:
This project would not exist without Redo Rescue, whose backup/restore format it implements. Redo Rescue is an independent third-party project (not mine and not managed by me) — please consider supporting it too. Redo Rescue accepts Bitcoin donations at:
1redoitC6r8JhUSrt5sVvF3ZEMj1kFyq2
EUPL-1.2. © 2026 Stefano Balzarotti (Orbintsoft), with the support of Claude agent AI. See COPYRIGHT.md for the copyright notice.
Backup/restore format and command semantics are derived from Redo Rescue (© Zebradots Software, GPLv3), studied for interoperability. This project is an independent, compatible implementation and is not affiliated with or endorsed by Redo Rescue.