Skip to content

Commit

Permalink
restic: initial notes
Browse files Browse the repository at this point in the history
  • Loading branch information
johannst committed May 1, 2024
1 parent 39b4e0b commit 7ca4156
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- [dot](./tools/dot.md)
- [ffmpeg](./tools/ffmpeg.md)
- [gnuplot](./tools/gnuplot.md)
- [restic](./tools/restic.md)

- [Resource analysis & monitor](./monitor/README.md)
- [lsof](./monitor/lsof.md)
Expand Down
1 change: 1 addition & 0 deletions src/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
- [dot](./dot.md)
- [ffmpeg](./ffmpeg.md)
- [gnuplot](./gnuplot.md)
- [restic](./restic.md)
48 changes: 48 additions & 0 deletions src/tools/restic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# restic(1)

## Create new snapshot repository

```bash
# 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>`.
```bash
restic -r <repo> restore -i <file_pattern> --target <dest> latest
```

## Mount snapshots
Mount snapshots as user filesystem (fuse) to given mount point.
```bash
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.
```bash
restic -r <repo> check
```

Check the repository for non-referenced data and remove it.
```bash
restic -r <repo> prune
```

## References
- [`restic` read the docs][restic]
- [sftp][restic-sftp]

[restic]: https://restic.readthedocs.io/en/stable/index.html
[restic-sftp]: https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#sftp

0 comments on commit 7ca4156

Please sign in to comment.