configs/arch-config/Dokumente/restic.md

82 lines
2.0 KiB
Markdown
Raw Normal View History

2020-09-30 18:19:49 +02:00
# Restic repos:
2020-05-16 11:47:54 +02:00
2020-12-26 11:46:04 +01:00
## Local backups
2021-10-31 14:47:59 +01:00
### 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)`
2021-03-23 16:06:18 +01:00
### lupusregina-backup home
2020-12-28 19:42:20 +01:00
There is currently a problem in go that makes this command fail. Run the following command before retrying: `export GODEBUG=asyncpreemptoff=1`
2021-10-31 14:47:59 +01:00
Storage path: `/mnt/backups/arco-pc/home/marc`
Backup path: `/home/marc`
Exclude file: `/home/marc/GitProjects/config/Dokumente/home-exclude.txt`
2020-12-26 11:46:04 +01:00
2020-09-30 18:19:49 +02:00
## B2 backups
```bash
2020-10-09 21:26:40 +02:00
export B2_ACCOUNT_ID=
```
```bash
2020-10-09 21:26:40 +02:00
export B2_ACCOUNT_KEY=
```
2020-06-03 18:20:39 +02:00
2021-02-22 22:08:21 +01:00
### Generalised version
#### Initialise repository
`restic -r b2:(bucket):(path) init`
#### Create backup
2021-10-31 14:47:59 +01:00
`restic -r b2:(bucket):(path) backup --verbose "(path)" --exclude-file=(exclude file)`
2021-02-22 22:08:21 +01:00
#### Show snapshots
`restic -r b2:(bucket):(path) snapshots`
#### Restore snapshot
`restic -r b2:(bucket):(path) restore --target "(path)" (snapshot)`
#### Remove Snapshots
2021-10-31 16:11:17 +01:00
`-n` for dry run
`--prune=true` also run prune
Only keep last X snapshots.
2021-02-22 22:08:21 +01:00
Does not remove data, just links
`restic -r b2:(bucket):(path) forget -l (X)`
2021-10-31 16:11:17 +01:00
Remove snapshots without certain tag
`restic -r b2:(bucket):(path) forget --keep-tag=(tag)`
Clean up unreferenced data.
2021-02-22 22:08:21 +01:00
`restic -r b2:(bucket):(path) prune`
2021-03-23 16:06:18 +01:00
### lupusregina-backup home
2021-10-31 14:47:59 +01:00
Bucket: `arco-pc-backup`
Path: `/home/marc`
Exclude file: `/home/marc/GitProjects/config/Dokumente/home-exclude.txt`
2021-03-23 16:06:18 +01:00
### lupusregina-backup 3tb toshiba
2021-10-31 14:47:59 +01:00
Bucket: `arco-pc-backup`
Path: `/mnt/harddrive`
Exclude file: `/home/marc/GitProjects/config/Dokumente/storage-exclude.txt`
2020-06-28 23:05:36 +02:00
2021-03-23 16:06:18 +01:00
### albedo-server-backup var/www
2021-10-31 14:47:59 +01:00
Bucket: `hydra-server-backup`
Path: `/var/www`
2021-01-15 20:06:08 +01:00
2021-03-23 16:06:18 +01:00
### albedo-server-backup etc
2021-10-31 14:47:59 +01:00
Bucket: `hydra-server-backup`
Path: `/etc`
2021-10-31 13:56:51 +01:00
### aura-server-backup etc
2021-10-31 14:47:59 +01:00
Bucket: `aura-server-backup`
Path: `/etc`