A beautiful TUI (Terminal User Interface) for managing ZFS backups, built with Bubble Tea and Lipgloss.
- Incremental Backups - Efficient snapshots of ALL datasets with syncoid integration
- Multi-Host Backups - Back up multiple machines to the same drive with hostname namespacing
- Pull Remote Backup - Pull ZFS snapshots from remote servers via SSH
- Push Backup to Remote - Push local snapshots to a remote backup server via SSH
- Force Backup - Destructive backup option for out-of-sync scenarios
- Restore Files - Dual-panel file explorer to browse snapshots and restore files
- Pool Information - View detailed pool structure, health, datasets, and snapshots
- Pool Maintenance - Start, stop, and monitor scrub operations
- Device Preparation - Create encrypted ZFS pools with AES-256-GCM
- Safe Unmounting - Properly export pools and power off USB drives
- Smart Pool Defaults - Auto-detects source/destination pools based on naming
- Saved Host Profiles - Remote hosts are persisted for quick reuse
- CLI Mode - Command-line arguments for automation and scripting
graph LR
subgraph "Local Machine"
A[NIXROOT/home]
B[NIXROOT/nix]
C[NIXROOT/root]
end
subgraph "USB Backup Drive"
D[NIXBACKUPS/abyss/home]
E[NIXBACKUPS/abyss/nix]
F[NIXBACKUPS/abyss/root]
end
A -->|syncoid| D
B -->|syncoid| E
C -->|syncoid| F
graph LR
subgraph "Remote Server (myserver)"
A[NIXROOT/home]
B[NIXROOT/nix]
end
subgraph "Local USB Backup Drive"
D[NIXBACKUPS/myserver/home]
E[NIXBACKUPS/myserver/nix]
end
A -->|"syncoid (SSH pull)"| D
B -->|"syncoid (SSH pull)"| E
graph LR
subgraph "Local Machine"
A[NIXROOT/home]
B[NIXROOT/nix]
end
subgraph "Remote Backup Server"
D[NIXBACKUPS/abyss/home]
E[NIXBACKUPS/abyss/nix]
end
A -->|"syncoid (SSH push)"| D
B -->|"syncoid (SSH push)"| E
graph TB
subgraph "USB Backup Drive (NIXBACKUPS)"
subgraph "abyss (laptop)"
A1[home]
A2[nix]
A3[root]
end
subgraph "myserver (remote)"
B1[home]
B2[nix]
B3[data]
end
subgraph "workstation (remote)"
C1[home]
C2[projects]
end
end
All datasets are namespaced by hostname, allowing multiple machines to share one backup drive without conflicts. Backward-compatible with existing flat NIXBACKUPS/home layouts.
# Download binary (Linux x86_64)
curl -L https://github.com/timlinux/zfs-backup/releases/latest/download/zfs-backup-linux-amd64 -o zfs-backup
chmod +x zfs-backup
sudo mv zfs-backup /usr/local/bin/
# Or with Nix
nix run github:timlinux/zfs-backupSee Installation Guide for more options including NixOS, Arch (AUR), Debian, Fedora, Snap, and Flatpak.
# Interactive mode
sudo zfs-backup
# CLI mode
sudo zfs-backup --backup # Run incremental backup
sudo zfs-backup --unmount # Safely unmount backup drive
sudo zfs-backup --help # Show help- Linux with ZFS filesystem
- syncoid (from sanoid package)
- Root privileges or ZFS delegation configured
- External drive with encrypted ZFS pool (for backups)
| Option | Description |
|---|---|
| Backup ZFS (incremental) | Run efficient incremental backup of all local datasets |
| Pull Remote Backup | Pull backup from a remote host via SSH |
| Push Backup to Remote | Push local snapshots to a remote backup server |
| Restore Files | Browse snapshots and restore individual files |
| Show zpool info | View pool structure, health, datasets, and snapshots |
| Pool Maintenance | Start/stop scrubs, monitor pool health |
| Recover Failed Backup | Fix broken sync state after interruption |
| Unmount Backup Disk | Safely export pool and power off USB drive |
| Prepare Backup Device | Create new encrypted ZFS pool on external drive |
| Force Backup (destructive) | Reset backup when incremental chain is broken |
| Key | Action |
|---|---|
↑/k ↓/j |
Navigate |
Enter |
Select |
Esc |
Go back |
q |
Quit |
| Key | Action |
|---|---|
j/k |
Scroll line |
Ctrl+u/d |
Page up/down |
g/G |
Top/bottom |
| Key | Action |
|---|---|
Tab or h/l |
Switch panels |
Space |
Toggle selection |
y |
Copy selected files |
/ |
Search |
m |
Create directory |
- Getting Started
- Backup Operations
- Restore Files
- Pool Information
- Pool Maintenance
- Installation Guide
- ZFS Delegation
zfs-backup/
├── main.go # Bubble Tea TUI and main application logic
├── zfs.go # ZFS operations (backup, prepare, unmount)
├── state.go # Backup state management for resume
├── restore.go # Restore mode with dual-panel explorer
├── flake.nix # Nix flake configuration
└── docs/ # MkDocs documentation
Contributions are welcome! Please feel free to submit a Pull Request.
See Contributing Guide.
MIT License - see LICENSE file for details.