configs/arch-config/Dokumente/restic.md

105 lines
2.6 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
2020-12-28 19:42:20 +01:00
### arco-pc-backup home
There is currently a problem in go that makes this command fail. Run the following command before retrying: `export GODEBUG=asyncpreemptoff=1`
2020-12-26 11:46:04 +01:00
```
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)
```
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
`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
2020-05-31 13:10:45 +02:00
restic -r b2:arco-pc-backup:/home/marc init
```
```bash
2020-11-13 18:25:40 +01:00
restic -r b2:arco-pc-backup:/home/marc backup --verbose "/home/marc/" --exclude-file=/home/marc/GitProjects/config/Dokumente/home-exclude.txt
```
```bash
2020-06-03 18:20:39 +02:00
restic -r b2:arco-pc-backup:/home/marc snapshots
```
```bash
2020-12-26 11:46:04 +01:00
restic -r b2:arco-pc-backup:/home/marc restore --target "/home/marc/" (snapshot)
```
### arco-pc-backup 3tb toshiba
```
restic -r b2:arco-pc-backup:/mnt/harddrive init
```
```
2021-02-23 08:07:52 +01:00
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)
```
2020-06-28 23:05:36 +02:00
### hydra-server-backup var
```
restic -r b2:hydra-server-backup:var init
```
```
restic -r b2:hydra-server-backup:var backup --verbose "/var"
```
```
restic -r b2:hydra-server-backup:var snapshots
```
```
restic -r b2:hydra-server-backup:var restore --target "/var" <snapshot>
```
2021-01-15 20:06:08 +01:00
### hydra-server-backup etc
2021-01-15 20:06:08 +01:00
```
restic -r b2:hydra-server-backup:etc init
2021-01-15 20:06:08 +01:00
```
```
restic -r b2:hydra-server-backup:etc backup --verbose "/etc"
2021-01-15 20:06:08 +01:00
```
```
restic -r b2:hydra-server-backup:etc snapshots
2021-01-15 20:06:08 +01:00
```
```
restic -r b2:hydra-server-backup:etc restore --target "/etc" <snapshot>
2021-01-15 20:06:08 +01:00
```