From f07e15a1302a231bd7e4a86b1748084df947fb4f Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 31 Oct 2021 14:47:59 +0100 Subject: [PATCH] Change restic to generalised versions --- arch-config/Dokumente/restic.md | 94 +++++++++++---------------------- 1 file changed, 30 insertions(+), 64 deletions(-) diff --git a/arch-config/Dokumente/restic.md b/arch-config/Dokumente/restic.md index 3e4c5131..aefd9cb1 100755 --- a/arch-config/Dokumente/restic.md +++ b/arch-config/Dokumente/restic.md @@ -2,20 +2,25 @@ ## Local backups +### Generalised version + +#### Initialise repository +`restic -r (storage path) init` + +#### Create backup +`restic -r (storage path) backup --verbose "(backup path)" --exclude-file=(exclude file)` + +#### Show snapshots +`restic -r (storage path) snapshots` + +#### Restore snapshot +`restic -r (storage path) restore --target "(backup path)" (snapshot)` + ### lupusregina-backup home There is currently a problem in go that makes this command fail. Run the following command before retrying: `export GODEBUG=asyncpreemptoff=1` -``` -restic init --repo /mnt/backups/arco-pc/home/marc -``` -``` -restic -r /mnt/backups/arco-pc/home/marc backup --verbose "/home/marc/" --exclude-file=/home/marc/GitProjects/config/Dokumente/home-exclude.txt -``` -``` -restic -r /mnt/backups/arco-pc/home/marc snapshots -``` -``` -restic -r /mnt/backups/arco-pc/home/marc restore --target "/home/marc" (snapshot) -``` +Storage path: `/mnt/backups/arco-pc/home/marc` +Backup path: `/home/marc` +Exclude file: `/home/marc/GitProjects/config/Dokumente/home-exclude.txt` ## B2 backups ```bash @@ -31,7 +36,7 @@ export B2_ACCOUNT_KEY= `restic -r b2:(bucket):(path) init` #### Create backup -`restic -r b2:(bucket):(path) backup --verbose "(path)" --exclude-file=(exclude file)` +`restic -r b2:(bucket):(path) backup --verbose "(path)" --exclude-file=(exclude file)` #### Show snapshots `restic -r b2:(bucket):(path) snapshots` @@ -48,62 +53,23 @@ Clean up unreferenced data. "-n" for dry run `restic -r b2:(bucket):(path) prune` ### lupusregina-backup home -```bash -restic -r b2:arco-pc-backup:/home/marc init -``` -```bash -restic -r b2:arco-pc-backup:/home/marc backup --verbose "/home/marc/" --exclude-file=/home/marc/GitProjects/config/Dokumente/home-exclude.txt -``` -```bash -restic -r b2:arco-pc-backup:/home/marc snapshots -``` -```bash -restic -r b2:arco-pc-backup:/home/marc restore --target "/home/marc/" (snapshot) -``` +Bucket: `arco-pc-backup` +Path: `/home/marc` +Exclude file: `/home/marc/GitProjects/config/Dokumente/home-exclude.txt` ### lupusregina-backup 3tb toshiba -``` -restic -r b2:arco-pc-backup:/mnt/harddrive init -``` -``` -restic -r b2:arco-pc-backup:/mnt/harddrive backup --verbose "/mnt/storage" --exclude-file=/home/marc/GitProjects/config/Dokumente/storage-exclude.txt --limit-upload=2048 -``` -``` -restic -r b2:arco-pc-backup:/mnt/harddrive snapshots -``` -``` -restic -r b2:arco-pc-backup:/mnt/harddrive restore --target "/mnt/storage" (snapshot) -``` +Bucket: `arco-pc-backup` +Path: `/mnt/harddrive` +Exclude file: `/home/marc/GitProjects/config/Dokumente/storage-exclude.txt` ### albedo-server-backup var/www -``` -restic -r b2:hydra-server-backup:var/www init -``` -``` -restic -r b2:hydra-server-backup:var/www backup --verbose "/var/www" -``` -``` -restic -r b2:hydra-server-backup:var/www snapshots -``` -``` -restic -r b2:hydra-server-backup:var/www restore --target "/var/www" -``` +Bucket: `hydra-server-backup` +Path: `/var/www` ### albedo-server-backup etc -``` -restic -r b2:hydra-server-backup:etc init -``` -``` -restic -r b2:hydra-server-backup:etc backup --verbose "/etc" -``` -``` -restic -r b2:hydra-server-backup:etc snapshots -``` -``` -restic -r b2:hydra-server-backup:etc restore --target "/etc" -``` +Bucket: `hydra-server-backup` +Path: `/etc` ### aura-server-backup etc -``` -restic -r b2:aura-server-backup:etc snapshots -``` +Bucket: `aura-server-backup` +Path: `/etc`