Compare commits
1 Commits
2.3.0+2.3.
...
cmd-setup-
| Author | SHA1 | Date | |
|---|---|---|---|
| cd89800fd4 |
14
README.md
14
README.md
@ -49,15 +49,23 @@ The backup location can be changed using the `RESTIC_REPOSITORY` env variable.
|
|||||||
|
|
||||||
### S3 Storage
|
### S3 Storage
|
||||||
|
|
||||||
To use S3 storage as backup location set the following envs:
|
1. To use S3 storage as backup location set the following envs:
|
||||||
```
|
```
|
||||||
RESTIC_REPOSITORY=s3:<S3-SERVICE-URL>/<BUCKET-NAME>
|
RESTIC_REPOSITORY=s3:<S3-SERVICE-URL>/<BUCKET-NAME>
|
||||||
SECRET_AWS_SECRET_ACCESS_KEY_VERSION=v1
|
SECRET_AWS_SECRET_ACCESS_KEY_VERSION=v1
|
||||||
AWS_ACCESS_KEY_ID=<MY_ACCESS_KEY>
|
AWS_ACCESS_KEY_ID=<MY_ACCESS_KEY>
|
||||||
COMPOSE_FILE="$COMPOSE_FILE:compose.s3.yml"
|
COMPOSE_FILE="$COMPOSE_FILE:compose.s3.yml"
|
||||||
```
|
```
|
||||||
and add your `<SECRET_ACCESS_KEY>` as docker secret:
|
2. and add your `<SECRET_ACCESS_KEY>` as docker secret:
|
||||||
`abra app secret insert <backupbot_name> aws_secret_access_key v1 <SECRET_ACCESS_KEY>`
|
```
|
||||||
|
abra app secret insert <backupbot_name> aws_secret_access_key v1 <SECRET_ACCESS_KEY>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Intialze you restic repository:
|
||||||
|
```
|
||||||
|
abra app cmd --chaos <backup_name> app setup_restic_s3
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
See [restic s3 docs](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#amazon-s3) for more information.
|
See [restic s3 docs](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#amazon-s3) for more information.
|
||||||
|
|
||||||
|
|||||||
4
abra.sh
4
abra.sh
@ -8,3 +8,7 @@ run_cron () {
|
|||||||
while [ ! -f /tmp/backup.log ]; do sleep 1; done
|
while [ ! -f /tmp/backup.log ]; do sleep 1; done
|
||||||
echo "$schedule $(crontab -l | tr -s " " | cut -d ' ' -f6-)" | crontab -
|
echo "$schedule $(crontab -l | tr -s " " | cut -d ' ' -f6-)" | crontab -
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_restic_s3() {
|
||||||
|
AWS_SECRET_ACCESS_KEY=$(cat /run/secrets/aws_secret_access_key) restic -r $RESTIC_REPOSITORY init
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user