X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/481131b8a80c1917387b854d16757b6d488cb78b..8a9ebc2de3bed79841082eb2416be7eee0d4739f:/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