feat: add postgresql-client

main
mandlm 2023-08-18 21:19:37 +02:00
parent 421b277acf
commit 7adba5a4ab
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,7 @@
FROM kopia/kopia
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y cron postgresql-client && rm -rf /var/lib/apt/lists/*
ARG KOPIA_CRON_SCHEDULE
ENV KOPIA_CRON_SCHEDULE ${KOPIA_CRON_SCHEDULE}

View File

@ -1,4 +1,9 @@
#!/bin/sh
#!/bin/bash
if [[ -v KOPIA_PG_DATABASE ]];
then
PGPASSWORD=$KOPIA_PG_PASSWORD pg_dump --host=$KOPIA_PG_HOST --username=$KOPIA_PG_USER $KOPIA_PG_DATABASE > /backup/database/$KOPIA_PG_DATABASE.sqldump || exit 1
fi
kopia repository connect filesystem \
--path /repository \