diff --git a/podman-framadate/60_db_dump.sh b/podman-framadate/60_db_dump.sh new file mode 100755 index 0000000..9ab03ce --- /dev/null +++ b/podman-framadate/60_db_dump.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +ABSDIR="$( dirname "$(readlink -f -- "$0")" )" +source ${ABSDIR}/../functions.sh +source ${ABSDIR}/vars.sh + +ensure_not_root +ensure_scriptdir_equals_user + +# pod should exist +ensure_pod_exists "${pod_name}" + +podman exec framadate-db /bin/bash -c '/usr/bin/mysqldump -uroot --password=${MYSQL_ROOT_PASSWORD} --all-databases' diff --git a/podman-gitea/60_db_dump.sh b/podman-gitea/60_db_dump.sh new file mode 100755 index 0000000..f62f073 --- /dev/null +++ b/podman-gitea/60_db_dump.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +ABSDIR="$( dirname "$(readlink -f -- "$0")" )" +source ${ABSDIR}/../functions.sh +source ${ABSDIR}/vars.sh + +ensure_not_root +ensure_scriptdir_equals_user + +# pod should exist +ensure_pod_exists "${pod_name}" + +db=${1} + +podman exec gitea-db /bin/bash -c "PGPASSWORD=\${POSTGRES_PASSWORD} pg_dump -w -F t -U \${POSTGRES_USER} ${db}" diff --git a/podman-matrix/60_db_dump.sh b/podman-matrix/60_db_dump.sh new file mode 100755 index 0000000..8215df1 --- /dev/null +++ b/podman-matrix/60_db_dump.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +ABSDIR="$( dirname "$(readlink -f -- "$0")" )" +source ${ABSDIR}/../functions.sh +source ${ABSDIR}/vars.sh + +ensure_not_root +ensure_scriptdir_equals_user + +# pod should exist +ensure_pod_exists "${pod_name}" + +db=${1} + +podman exec synapse-db /bin/bash -c "PGPASSWORD=\${POSTGRES_PASSWORD} pg_dump -w -F t -U \${POSTGRES_USER} ${db}" diff --git a/podman-seafile/60_db_dump.sh b/podman-seafile/60_db_dump.sh new file mode 100755 index 0000000..1f921f5 --- /dev/null +++ b/podman-seafile/60_db_dump.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +ABSDIR="$( dirname "$(readlink -f -- "$0")" )" +source ${ABSDIR}/../functions.sh +source ${ABSDIR}/vars.sh + +ensure_not_root +ensure_scriptdir_equals_user + +# pod should exist +ensure_pod_exists "${pod_name}" + +podman exec seafile-db /bin/bash -c '/usr/bin/mysqldump -uroot --password=${MYSQL_ROOT_PASSWORD} --all-databases'