From 87336810a87d3ab0147527a876b818dd46f86840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Tue, 14 Feb 2017 18:40:19 +0100 Subject: [PATCH] fix postgresql backup dir permission error --- contrib/backup/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/backup/functions b/contrib/backup/functions index e72d31e4a..ddb529ddf 100644 --- a/contrib/backup/functions +++ b/contrib/backup/functions @@ -42,7 +42,8 @@ function backup_db () { if [ "${DB_ADAPTER}" == "mysql2" ]; then mysqldump --opt --single-transaction -u${DB_USER} -p${DB_PASS} ${DB_NAME} | gzip > ${BACKUP_DIR}/${TIMESTAMP}_zammad_db.mysql.gz elif [ "${DB_ADAPTER}" == "postgresql" ]; then - su -c "pg_dump -c ${DB_NAME} | gzip > ${BACKUP_DIR}/${TIMESTAMP}_zammad_db.psql.gz" postgres + su -c "pg_dump -c ${DB_NAME} | gzip > /tmp/${TIMESTAMP}_zammad_db.psql.gz" postgres + mv /tmp/${TIMESTAMP}_zammad_db.psql.gz ${BACKUP_DIR} else echo "DB ADAPTER not found. if its sqlite backup is already saved in filebackup" fi