Init
This commit is contained in:
commit
aca231c728
8 changed files with 86 additions and 0 deletions
9
templates/autopostgresqlbackup.j2
Normal file
9
templates/autopostgresqlbackup.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
{% for key, value in autopostgresqlbackup_config.items() %}
|
||||
{% if value is number %}
|
||||
{{ key | upper }}={{ value }}
|
||||
{% else %}
|
||||
{{ key | upper }}="{{ value }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
13
templates/autopostgresqlbackup_post_script.j2
Normal file
13
templates/autopostgresqlbackup_post_script.j2
Normal file
|
@ -0,0 +1,13 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
source /etc/default/autopostgresqlbackup
|
||||
|
||||
# available variables:
|
||||
|
||||
# strings, i.e. character sequences
|
||||
echo "$BACKUPDIR"
|
||||
|
||||
[ -z "$BACKUPDIR" ] && echo >&2 "Invalid / unknown BACKUPDIR" && exit 1
|
||||
|
||||
# Loeschen der alten Backups
|
||||
find "${BACKUPDIR}/monthly" "${BACKUPDIR}/weekly" "${BACKUPDIR}/daily" -type f -mtime +{{ autopostgresqlbackup_delete_backups_after_days }} -delete
|
Loading…
Add table
Add a link
Reference in a new issue