diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-05-01 19:33:52 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-05-01 19:33:52 +0200 |
commit | 7ca41565c4e70b212cb88a4d18c18fa35768df6d (patch) | |
tree | 54acf84cb53e9cccb86762e8a0787025a44f21b2 /src | |
parent | 39b4e0bf8a3b02f1606a0efeefeb39891242bf99 (diff) | |
download | notes-7ca41565c4e70b212cb88a4d18c18fa35768df6d.tar.gz notes-7ca41565c4e70b212cb88a4d18c18fa35768df6d.zip |
restic: initial notes
Diffstat (limited to 'src')
-rw-r--r-- | src/SUMMARY.md | 1 | ||||
-rw-r--r-- | src/tools/README.md | 1 | ||||
-rw-r--r-- | src/tools/restic.md | 48 |
3 files changed, 50 insertions, 0 deletions
diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 8a095a5..a38d33b 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -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) diff --git a/src/tools/README.md b/src/tools/README.md index d2a45e9..60ee688 100644 --- a/src/tools/README.md +++ b/src/tools/README.md @@ -9,3 +9,4 @@ - [dot](./dot.md) - [ffmpeg](./ffmpeg.md) - [gnuplot](./gnuplot.md) +- [restic](./restic.md) diff --git a/src/tools/restic.md b/src/tools/restic.md new file mode 100644 index 0000000..600e4f0 --- /dev/null +++ b/src/tools/restic.md @@ -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 |