Update to 2024-01-04 17:00

This commit is contained in:
Daniel Berteaud
2024-01-04 17:00:34 +01:00
parent 9675be207e
commit 72afb8eda5
47 changed files with 65 additions and 57 deletions

View File

@@ -10,7 +10,7 @@
- name: Backup the database (PostgreSQL)
command: >
/usr/pgsql-15/bin/pg_dump
/usr/pgsql-16/bin/pg_dump
--clean
--create
--host={{ documize_db_server }}

View File

@@ -5,7 +5,7 @@
name:
- tar
- zstd
- postgresql15
- postgresql16
tags: documize
- name: Download documize

View File

@@ -13,14 +13,14 @@ set -eo pipefail
--add-drop-table {{ documize_db_name | quote }} | zstd -c > "{{ documize_root_dir }}/backup/{{ documize_db_name }}.sql.zst"
{% elif documize_db_engine == 'postgres' %}
{% if documize_db_server not in ['127.0.0.1','localhost'] %}
PGPASSWORD={{ documize_db_pass | quote }} /usr/pgsql-15/bin/pg_dump \
PGPASSWORD={{ documize_db_pass | quote }} /usr/pgsql-16/bin/pg_dump \
--clean \
--create \
--username={{ documize_db_user | quote }} \
--host={{ documize_db_server | quote }} \
{{ documize_db_name | quote }} | \
{% else %}
su - postgres -c "/usr/pgsql-15/bin/pg_dump --clean --create {{ documize_db_name | quote }}" | \
su - postgres -c "/usr/pgsql-16/bin/pg_dump --clean --create {{ documize_db_name | quote }}" | \
{% endif %}
zstd -c > "{{ documize_root_dir }}/backup/{{ documize_db_name }}.sql.zst"
{% endif %}