Skip to content

peteonrails/retrograde

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retrograde

A modern ZFS snapshot management tool for Linux.

License: MIT Rust

Features

  • Smart Scheduling - Automatic hourly, daily, weekly, and monthly snapshots
  • Retention Policies - Configurable pruning to manage disk space
  • Beautiful TUI - Navigate with vim-style keybindings
  • Wayland-Native GUI - Built with iced for Hyprland, Sway, etc.
  • Diff Viewer - See what changed since any snapshot
  • Systemd Integration - Run as a daemon with pre/post hooks

Installation

# Clone the repository
git clone https://github.com/peteonrails/retrograde.git
cd retrograde

# Build (TUI only)
cargo build --release

# Build with GUI
cargo build --release --features gui

# Install
sudo cp target/release/retrograde /usr/local/bin/

Usage

CLI

# List all snapshots
retrograde list

# List snapshots for a specific dataset
retrograde list rpool/ROOT

# Create a snapshot
retrograde create rpool/home

# Delete a snapshot
retrograde delete rpool/home@retrograde-manual-2024-11-28

# Restore to a snapshot
retrograde restore rpool/home@retrograde-daily-2024-11-28

# Show changes since snapshot
retrograde diff rpool/home@retrograde-daily-2024-11-28

TUI

retrograde tui
Key Action
Tab / 1-2 Switch tabs
j/k or ↑/↓ Navigate list
g/G Jump to first/last
c Create snapshot
d Delete snapshot
r Restore snapshot
D Show diff
R Refresh
? Help
q Quit

GUI

retrograde-gui

Daemon

# Configure
sudo mkdir -p /etc/retrograde
sudo cp assets/config.toml.example /etc/retrograde/config.toml

# Install and enable service
sudo cp assets/retrograde.service /etc/systemd/system/
sudo systemctl enable --now retrograde

Configuration

[global]
backend = "zfs"
recursive = false
snapshot_prefix = "retrograde"

[[datasets]]
name = "rpool/ROOT"
enabled = true

[datasets.schedule]
hourly = true
daily = true
weekly = true
monthly = true

[datasets.retention]
hourly = 6
daily = 7
weekly = 4
monthly = 12

Architecture

Retrograde is built with extensibility in mind:

  • Backend Trait - SnapshotBackend trait allows future BTRFS/RSync support
  • Newtype Pattern - Validated types prevent command injection
  • Async Runtime - Tokio for non-blocking operations
  • Feature Flags - TUI and GUI are optional features

Why Not Timeshift?

Timeshift is great, but:

  • No ZFS support
  • Vala codebase is difficult to maintain
  • GTK3 dependency is heavy

Retrograde is written in Rust with minimal dependencies, ZFS as a first-class citizen, and works great on Wayland.

License

MIT License - see LICENSE for details.

About

A modern ZFS snapshot management tool for Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages