Update to 2021-11-08 13:00

master
Daniel Berteaud 3 years ago
parent c744a1c861
commit 8def2b06cd
  1. 2
      roles/pgadmin4/tasks/directories.yml
  2. 6
      roles/pgadmin4/tasks/install.yml
  3. 5
      roles/pgadmin4/templates/post-backup.j2
  4. 5
      roles/pgadmin4/templates/pre-backup.j2

@ -14,4 +14,6 @@
owner: pgadmin4_{{ pga_id }}
- path: "{{ pga_root_dir }}/meta"
mode: 700
- path: "{{ pga_root_dir }}/backup"
mode: 700
tags: pgadmin4

@ -75,3 +75,9 @@
when: pga_systemd_unit.changed
tags: pgadmin4
- name: Install backup hooks
template: src={{ item }}-backup.j2 dest=/etc/backup/{{ item }}.d/pgadmin_{{ pga_id }} mode=755
loop:
- pre
- post
tags: pgadmin4

@ -0,0 +1,5 @@
#!/bin/sh
set -eo pipefail
rm -f {{ pga_root_dir }}/backup/*

@ -0,0 +1,5 @@
#!/bin/sh
set -eo pipefail
sqlite3 {{ pga_root_dir }}/data/pgadmin4.db .dump | zstd -c > {{ pga_root_dir }}/backup/pgadmin4.sql.zst
Loading…
Cancel
Save