Added support for PostgreSQL; Restore MySQL with UTF8 support

This commit is contained in:
DecaTec
2018-12-24 15:36:09 +01:00
parent 481131b8a8
commit d7283bd57a
3 changed files with 22 additions and 3 deletions

View File

@@ -123,7 +123,11 @@ echo
# Backup DB
#
echo "Backup Nextcloud database..."
# MySQL/MariaDB:
mysqldump --single-transaction -h localhost -u "${dbUser}" -p"${dbPassword}" "${nextcloudDatabase}" > "${backupdir}/${fileNameBackupDb}"
# PostgreSQL (uncomment if you are using PostgreSQL as Nextcloud database)
#PGPASSWORD="${dbPassword}" pg_dump "${nextcloudDatabase}" -h localhost -U "${dbUser}" -f "${backupdir}/${fileNameBackupDb}"
echo "Done"
echo