restic(1)

Create new snapshot repository

# Create a local backup repository.
restic -r <path> init

# Create a backup repository on a remote host.
restic -r sftp:user@host:<path> init

Example: Restore file pattern from latest snapshot

Restore files matching <file_pattern> from the latest snapshot (pseudo snapshot ID) into <dest>.

restic -r <repo> restore -i <file_pattern> --target <dest> latest

Mount snapshots

Mount snapshots as user filesystem (fuse) to given mount point.

restic -r <repo> mount <mntpoint>

# Mounted snapshots can be limited by host.
restic -r <repo> mount --host <host> <mntpoint>

# Mounted snapshots can be limited by path (abs path).
restic -r <repo> mount --path <abspath> <mntpoint>

Repository maintenance

Check the repository for errors and report them.

restic -r <repo> check

Check the repository for non-referenced data and remove it.

restic -r <repo> prune

References