Put backups in a folder labeled after full inventory hostname, not short
We were having conflicts with psql1.9iron.club and psql1.desu.ltd
This commit is contained in:
parent
db9859c40d
commit
dc52392ebb
@ -4,7 +4,6 @@
|
|||||||
# General-purpose, Ansible-managed backup script to push directories to
|
# General-purpose, Ansible-managed backup script to push directories to
|
||||||
# an S3 bucket
|
# an S3 bucket
|
||||||
#
|
#
|
||||||
|
|
||||||
# NOTICE: THIS FILE CONTAINS SECRETS
|
# NOTICE: THIS FILE CONTAINS SECRETS
|
||||||
# This file may contain the following secrets depending on configuration:
|
# This file may contain the following secrets depending on configuration:
|
||||||
# * An AWS access key
|
# * An AWS access key
|
||||||
@ -57,5 +56,5 @@ nice -n 10 tar {{ backup_s3backup_tar_args }}{{ backup_s3backup_tar_args_extra }
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
"${DIRS[@]}" \
|
"${DIRS[@]}" \
|
||||||
| aws s3 cp - \
|
| aws s3 cp - \
|
||||||
"s3://{{ backup_s3_bucket }}/{{ inventory_hostname_short }}/$(date "+{{ backup_dateformat }}").tar.gz"
|
"s3://{{ backup_s3_bucket }}/{{ inventory_hostname }}/$(date "+{{ backup_dateformat }}").tar.gz"
|
||||||
|
|
||||||
|
@ -42,6 +42,6 @@ for db in "${DATABASES[@]}"; do
|
|||||||
sudo -u postgres pg_dump "$db" \
|
sudo -u postgres pg_dump "$db" \
|
||||||
| gzip -v9 \
|
| gzip -v9 \
|
||||||
| aws s3 cp - \
|
| aws s3 cp - \
|
||||||
"s3://{{ backup_s3_bucket }}/{{ inventory_hostname_short }}/$db-$(date "+{{ backup_dateformat }}").pgsql.gz"
|
"s3://{{ backup_s3_bucket }}/{{ inventory_hostname }}/$db-$(date "+{{ backup_dateformat }}").pgsql.gz"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user