Roots Discourse

Backup to s3 not working


#1

I need some additional guide for backing up to s3 with Trellis. I followed this guide:

Backups are created succesfully in the server at /tmp/ (in fact, in a few days these backups filled completely the storage space).

Also, a lot of “access denied” entries are created in the S3 bucket.

The config file was created at /home/web/.aws/config but it contents has not my aws keys in ansible config:

# group_vars/all/vault.yml
vault_aws_access_key_id: ********
vault_aws_secret_access_key: "***********"

Instead, I have this:

# /home/web/.aws/config
[default]
output = json
region = ap-southeast-2
aws_access_key_id = YOUR_ACCESS_KEY_ID
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY

Should I put my keys by hand in the config file in the server side?

UPDATE

Editing vendor/roles/aws-cli/defaults/main.yml

aws_access_key_id: 'YOUR_ACCESS_KEY_ID'
aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'

to

aws_access_key_id: '{{ vault_aws_access_key_id }}'
aws_secret_access_key: '{{ vault_aws_secret_access_key }}'

/home/web/.aws/config was created with the right keys.


#3

Solved here: Backing Up Trellis Sites to an S3 Bucket