A script to manage snapper and borg backups on my local machine
readme.md

backupctl #

Overview #

backupctl status
Show Borg timer/service state, latest archive, backup disk usage, and Snapper snapshots.

backupctl timers
Show Borg and Snapper timers.

backupctl disk
Show the mounted backup disk, free space, UUID, and label.

Borg #

backupctl backup
Run a backup now with live progress.

backupctl dry-run
Validate the backup flow without creating an archive.

backupctl borg-list
List all Borg archives.

backupctl latest
Print the newest home-* archive name.

backupctl files
List files in the latest archive.

backupctl files latest '.config/ghostty'
Search paths in the latest archive.

backupctl files home-2026-09-17_03-01-00 '.config/ghostty'
Search paths in a specific archive.

backupctl info
Show information for the latest archive.

backupctl info home-2026-09-17_03-01-00
Show information for a specific archive.

backupctl verify
Perform a full Borg repository and data integrity check.

backupctl logs
Show the last 100 Borg systemd log lines.

backupctl logs 250
Show the last 250 Borg systemd log lines.

backupctl test-restore .config/ghostty/config
Restore a file from the latest archive into /tmp and compare it with the current copy.

backupctl test-restore Documents/file.txt home-2026-09-17_03-01-00
Test-restore a file or directory from a specific archive.

Snapper #

backupctl snap-list
List /home snapshots.

backupctl snap-create
Create a manual snapshot.

backupctl snap-create "before config changes"
Create a snapshot with a description.

backupctl snap-status 7
Show changes between snapshot 7 and the current filesystem.

backupctl snap-diff 7 .config/ghostty/config
Show the content diff for a file between snapshot 7 and now.

backupctl snap-undo 7 .config/ghostty/config
Restore a file or directory from snapshot 7. Requires typing UNDO before changes are made.

Help #

backupctl help
Show all available commands.