Use the prefix everywhere
This commit is contained in:
parent
3df4186816
commit
0cb6927831
11
README.md
11
README.md
@ -1,3 +1,8 @@
|
||||
Sets up backups to Cloudflare R2
|
||||
|
||||
|
||||
|
||||
|
||||
# Instalation
|
||||
|
||||
In requirements.yml:
|
||||
@ -8,3 +13,9 @@ roles:
|
||||
version: master
|
||||
name: setup-backups
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Setup
|
||||
|
||||
Create a Cloudflare R2 account and create an admin token.
|
||||
|
@ -69,7 +69,7 @@
|
||||
failed_when: "command_result.rc!=0 and 'repository master key and config already initialized' not in command_result.stderr"
|
||||
changed_when: "false"
|
||||
environment:
|
||||
RESTIC_REPOSITORY: "s3:{{ cloudflare_r2_endpoint }}/icd-backup-{{ inventory_hostname }}"
|
||||
RESTIC_REPOSITORY: "s3:{{ cloudflare_r2_endpoint }}/{{ backup_bucket_prefix }}-{{ inventory_hostname }}"
|
||||
AWS_ACCESS_KEY_ID: "{{ cloudflare_r2_access_key }}"
|
||||
AWS_SECRET_ACCESS_KEY: "{{ cloudflare_r2_secret_key }}"
|
||||
tags:
|
||||
|
@ -1,5 +1,5 @@
|
||||
declare -a DIRS_TO_BACKUP=({% for item in all_backup_paths %}"{{ item }}"{% if not loop.last %} {% endif %}{% endfor %})
|
||||
export DIRS_TO_BACKUP_STR=$(declare -p DIRS_TO_BACKUP)
|
||||
export RESTIC_REPOSITORY="rclone:cloudflare-r2:icd-backup-{{ inventory_hostname }}"
|
||||
export RESTIC_REPOSITORY="rclone:cloudflare-r2:{{ backup_bucket_prefix }}-{{ inventory_hostname }}"
|
||||
export PWD_FILE=/backup-pwd
|
||||
export RESTIC=/usr/bin/restic
|
||||
|
Loading…
x
Reference in New Issue
Block a user