# Backing Up Trellis Sites to an S3 Bucket

**URL:** https://discourse.roots.io/t/backing-up-trellis-sites-to-an-s3-bucket/12195
**Category:** guides
**Tags:** guide
**Created:** 2018-04-13T02:55:22Z
**Posts:** 17
**Showing post:** 5 of 17

## Post 5 by @aitor — 2018-11-11T08:39:29Z

To debug script, run `./backup-to-s3.sh` from its directory:

```
cd /srv/www/my-site.com/current/scripts && ./backup-to-s3.sh
```

instead

```
bash /srv/www/my-site.com/current/scripts/backup-to-s3.sh
```

Otherwise the line 2 throw an error:

```
$ bash /srv/www/my-site.com/current/scripts/backup-to-s3.sh 
cat: ../.env: No such file or directory
/srv/www/my-site.com/current/scripts/backup-to-s3.sh: line 10: cd: /srv/www//current: No such file or directory
```

Also, I suggest to add this in the document guide:

Change `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 }}'
```

---

_[View the full topic](https://discourse.roots.io/t/backing-up-trellis-sites-to-an-s3-bucket/12195)._
