feat: add postgresql-client
This commit is contained in:
parent
421b277acf
commit
7adba5a4ab
2 changed files with 7 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
FROM kopia/kopia
|
FROM kopia/kopia
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
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
|
ARG KOPIA_CRON_SCHEDULE
|
||||||
ENV KOPIA_CRON_SCHEDULE ${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 \
|
kopia repository connect filesystem \
|
||||||
--path /repository \
|
--path /repository \
|
||||||
|
|
Loading…
Reference in a new issue