From 3c0ca9c3091db2af84848b7b6e593393cc077066 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 Feb 2021 22:08:21 +0100 Subject: [PATCH] Add generalised version of commands --- arch-config/Dokumente/restic.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch-config/Dokumente/restic.md b/arch-config/Dokumente/restic.md index 787b777a..c57f9b83 100755 --- a/arch-config/Dokumente/restic.md +++ b/arch-config/Dokumente/restic.md @@ -25,6 +25,29 @@ export B2_ACCOUNT_ID= export B2_ACCOUNT_KEY= ``` +### Generalised version + +#### Initialise repository +`restic -r b2:(bucket):(path) init` + +#### Create backup +`restic -r b2:(bucket):(path) backup --verbose "(path)" --exclude-file=(exclude file)` + +#### Show snapshots +`restic -r b2:(bucket):(path) snapshots` + +#### Restore snapshot +`restic -r b2:(bucket):(path) restore --target "(path)" (snapshot)` + +#### Remove Snapshots +Only keep last X snapshots. Use "-n" to do a dry run +Does not remove data, just links +`restic -r b2:(bucket):(path) forget -l (X)` + +Clean up unreferenced data. "-n" for dry run +`restic -r b2:(bucket):(path) prune` + + ### arco-pc-backup home ```bash restic -r b2:arco-pc-backup:/home/marc init