Skip to content

Commit

Permalink
Net/Restic: Simplify setup
Browse files Browse the repository at this point in the history
  • Loading branch information
baltpeter committed Sep 18, 2021
1 parent 300f471 commit e10c5a8
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions content/network/restic.md
Expand Up @@ -8,27 +8,26 @@ Important data is backed up to Backblaze B2 using restic. This file describes th

First, create a new [bucket](https://secure.backblaze.com/b2_buckets.htm) (private, disable object lock). Then on the [Application Keys page](https://secure.backblaze.com/app_keys.htm), create a new key (only allow access to the bucket in question, read/write).

```sh
apt install restic
Then, create a file `~/env-restic-b2.sh` like so:

export B2_ACCOUNT_ID=abc
```sh
export RESTIC_REPOSITORY=b2:<bucket name>:restic-repo
export RESTIC_PASSWORD=123
export B2_ACCOUNT_ID=abc # Choose a new password and save it in 1Password.
export B2_ACCOUNT_KEY=def

# Set a new password and save it in 1Password.
restic -r b2:<bucket name>:restic-repo init
```

## Scripts

Create a file `~/env-restic-b2.sh` like so:
Run:

```sh
export RESTIC_REPOSITORY=b2:<bucket name>:restic-repo
export RESTIC_PASSWORD=123
export B2_ACCOUNT_ID=abc
export B2_ACCOUNT_KEY=def
apt install restic

source ~/env-restic-b2.sh
restic init
```

## Scripts

Create a file `~/backup-restic-b2.sh` like so:

```sh
Expand Down

0 comments on commit e10c5a8

Please sign in to comment.