X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/481131b8a80c1917387b854d16757b6d488cb78b..1575f860d04e5ef4213ab61c919c328ba9214c40:/NextcloudBackup.sh?ds=sidebyside diff --git a/NextcloudBackup.sh b/NextcloudBackup.sh index fb20a47..3e08cb4 100644 --- a/NextcloudBackup.sh +++ b/NextcloudBackup.sh @@ -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