commit
e24093769c
|
@ -1,6 +1,6 @@
|
|||
FROM debian
|
||||
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wget lftp mariadb-client
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wget lftp mariadb-client postgresql-client
|
||||
|
||||
ARG CLIENT_VERSION
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
BACKUP_DIR="/backup/database"
|
||||
|
||||
echo "Starting to backup database"
|
||||
echo "Starting to backup mysql database"
|
||||
|
||||
mkdir --parents $BACKUP_DIR
|
||||
mysqldump --single-transaction --host=$MYSQL_BACKUP_HOST --user=$MYSQL_BACKUP_USER --password=$MYSQL_BACKUP_PASSWORD $MYSQL_BACKUP_DATABASE > $BACKUP_DIR/$MYSQL_BACKUP_DATABASE.sqldump
|
||||
|
||||
echo "Database backup finished"
|
||||
echo "Mysql database backup finished"
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
BACKUP_DIR="/backup/database"
|
||||
|
||||
echo "Starting to backup postgres database"
|
||||
|
||||
mkdir --parents $BACKUP_DIR
|
||||
PGPASSWORD=$PG_PASSWORD pg_dump --host=$PG_HOST --username=$PG_USER $PG_DATABASE > $BACKUP_DIR/$PG_DATABASE.sqldump
|
||||
|
||||
echo "Postgres database backup finished"
|
|
@ -7,3 +7,7 @@ fi
|
|||
if [[ -n "$DO_MYSQL_BACKUP" ]]; then
|
||||
sh /usr/local/etc/urbackup/mysql_backup.sh
|
||||
fi
|
||||
|
||||
if [[ -n "$DO_POSTGRES_BACKUP" ]]; then
|
||||
sh /usr/local/etc/urbackup/postgres_backup.sh
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue