Skip to content

Restic

Install

sudo dnf install restic

Basic Tutorial

# Create a repo
restic -r /tmp/restic-repo init

# Backup a directory
restic -r /temp/restic-repo backup /path/to/directory

# View snapshots
restic -r /temp/restic-repo snapshots

Common Commands

List all snapshots

restic -r <repo> snapshots

Restore using mount

# Create a mountpoint
mkdir /mnt/restic-repo

# Mount it
restic -r <repo> mount /mnt/restic-repo

Compare snapshots

restic -r <repo> diff snapshot_hash1 snapshot_hash2

Check repo integrity

restic -r <repo> check

Delete snapshot

# Remove the snapshot
restic -r <repo> forget <snapshot_hash>

# Prune to remove unused files
restic -r <repo> prune

Docker

Documentation


Last update: August 5, 2023
Created: May 27, 2023