feat: add postgresql-client
parent
421b277acf
commit
7adba5a4ab
|
@ -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}
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in New Issue