Commit 4a483e42 authored by Lars Beckers's avatar Lars Beckers
Browse files

postgres: add backup script compat for bullseye

parent 2063e368
Pipeline #2898 passed with stage
in 29 seconds
for DB in $(sudo -u postgres psql -t -q -A -c "select datname from pg_catalog.pg_database where not datname like 'template%';")
sudo -u postgres pg_dump $DB | gzip -c -- > ${DB}.sql.gz
sudo -u postgres pg_dumpall -g -U postgres | gzip -c -- > pg_dumpall.sql.gz
......@@ -38,8 +38,8 @@
- name: ensure we have our postgres backup script
dest: /usr/local/bin/
src: "pgbackup{{ '-bullseye' if ansible_distribution_major_version|int(default=99) > 10 else '' }}.sh"
dest: /usr/local/bin/
owner: root
group: root
mode: '0755'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment