Any Linux · aarch64 and x86_64 · MIT

Backup you can prove restores, built on Apple Silicon first

Once a disk is gone, only one question matters: could I actually restore this machine? linux-backup-system layers Borg archives, Back In Time-format snapshots and a btrfs or Timeshift snapshot layer, backs up LUKS headers, and checks daily, from what is on the backup drive, that a restore would boot. On restore it rebuilds the boot chain for whatever it finds: GRUB, systemd-boot, Unified Kernel Images, an encrypted /boot.

Testing only, unless your setup is all green. Unless your distro, root filesystem and boot layout are all ✅ in the bare-metal restore column of the status table, use this for testing, not production. A backup you have never restored is a hope, not a backup.

Guides

Restore Asahi Linux from a backupWhy a Mac running Linux can't be restored like a PC, and the path that works: a fresh Asahi install, then restore over it. A bootable bare-metal restore from BorgWhy a file-level archive isn't a bootable machine, and everything that has to be rewritten and rebuilt.

A Mac running Linux can be rebuilt from this backup

A dead disk, a wiped machine, an upgrade that won't boot. Run the Asahi installer from macOS to get a fresh Fedora Asahi Remix stub booting; that is the only part of the machine that is Apple's to make. Then point this suite's restore at it. Every file comes back. fstab, crypttab and every kernel command line are rewritten to the new partitions' ids. The initramfs and GRUB config are rebuilt inside the restored system, and a final check refuses to call it done while anything would boot, unlock or mount the wrong disk. Verified on a MacBook Pro (M1 Pro) in September 2026.

On x86-64 it's the harder case: bare metal means recreating the boot chain from files alone. That covers GRUB or systemd-boot, UKIs and their embedded command lines, Secure Boot with shim or your own keys, LVM-on-LUKS and an encrypted /boot. That is what the rest of the suite exists for, eight such restores deep.

Quick start

git clone https://github.com/doug445/linux-backup-system.git
cd linux-backup-system
sudo ./deploy.sh --dry-run     # detect distro, fs, boot layout, drive; print the plan; change nothing
sudo ./deploy.sh               # install, and set the drive up if none is mounted
sudo borg-backup.sh --dry-run  # see exactly what the first backup would do
sudo borg-backup.sh            # the first backup
sudo backup-verify.sh          # would a bare-metal restore boot? exit 0 = yes

A backup never starts because a drive appeared. Plugging the drive in unlocks and mounts it; a backup runs when you start one or a timer fires. Retention never deletes by age.

What's verified

Ten systems are verified with a real backup, a passing backup-verify.sh and a bare-metal restore onto a blank disk that booted, logged in, came up on the network and byte-compared against the archive. An eleventh, an M2 Max, was restored onto a disk image and booted in a VM; the real boot behind a second Asahi stub is still to come.

✅ Verified❌ Wanted
DistrosFedora, Fedora Asahi Remix (aarch64), Debian / Ubuntu / Linux Mint, Arch / Manjaro / EndeavourOSopenSUSE; Slackware, Gentoo, Alpine, Void, NixOS, Solus
Root filesystemsbtrfs (subvolumes, swapfile), ext4, root on LUKS2, LVM-on-LUKSxfs, f2fs
Boot layoutsGRUB (EFI), systemd-boot (Type #1 and UKI), UKIs from dracut / kernel-install / mkinitcpio, Secure Boot with sbctl keys, encrypted argon2id /boot, ESP at /efi + XBOOTLDR, SELinux relabel, Apple Silicon over a fresh Asahi installGRUB legacy BIOS, encrypted pbkdf2 /boot, Raspberry Pi, Limine, rEFInd; ⚠️ Secure Boot through shim, restore from a live USB

Full tables: STATUS.md. The machines: TESTED-SYSTEMS.md.

Help make it universal

One person can't own every distro, filesystem and boot layout. A working patch for a ❌ row puts your name on the copyright line of the licence, in the release notes and in the contributors table. Most wanted are the distro families the package map doesn't know yet (Slackware, Gentoo, Alpine, Void, NixOS, Solus) and a Raspberry Pi. See CONTRIBUTING.md.

FAQ

Can a Mac running Asahi Linux be restored from a backup?

Yes. Run the Asahi installer from macOS to get a fresh Fedora Asahi Remix stub booting, then restore over it. The suite rewrites fstab, crypttab and every kernel command line to the new partitions, rebuilds the initramfs and GRUB inside the restored system, and verifies before calling it done. This was verified on a MacBook Pro (M1 Pro) in September 2026.

Should I use it in production?

Only if your distro, root filesystem and boot layout are all marked verified for bare-metal restore in the project's status table. Otherwise use it for testing. A backup you have never restored is a hope, not a backup.

Does a backup start when I plug the drive in?

No. Plugging the drive in unlocks and mounts it; a backup runs only when you start one or a timer fires. Every script takes --dry-run, and retention never deletes by age.

Which systems are verified?

Ten systems are verified with a real bare-metal restore that booted, and an eleventh, an M2 Max, restored onto a disk image and booted in a VM. Verified layouts include GRUB, systemd-boot, UKIs, Secure Boot with sbctl keys, encrypted argon2id /boot and LVM-on-LUKS, on Fedora, Fedora Asahi Remix, Debian, Ubuntu, Mint, Arch, Manjaro and EndeavourOS.

Encrypting the machine as well? See AsahiLocker (Apple Silicon) and LinuxLocker.