Fix backup script to exclude items BEFORE the main arguments
This commit is contained in:
parent
9bec0ffb58
commit
1710d1108b
@ -51,10 +51,11 @@ echo "Will ignore the following items:"
|
|||||||
echo "- {{ item }}"
|
echo "- {{ item }}"
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
echo "Will upload resultant backup to {{ backup_s3_bucket }}"
|
echo "Will upload resultant backup to {{ backup_s3_bucket }}"
|
||||||
nice -n 10 tar {{ backup_s3backup_tar_args }}{{ backup_s3backup_tar_args_extra }} "${DIRS[@]}" \
|
nice -n 10 tar {{ backup_s3backup_tar_args }}{{ backup_s3backup_tar_args_extra }} \
|
||||||
{% for item in backup_s3backup_exclude_list + backup_s3backup_exclude_list_extra %}
|
{% for item in backup_s3backup_exclude_list + backup_s3backup_exclude_list_extra %}
|
||||||
--exclude "{{ item }}" \
|
--exclude "{{ item }}" \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
"${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_short }}/$(date "+{{ backup_dateformat }}").tar.gz"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user