]> git.p6c8.net - nextcloud-backup-restore.git/blobdiff - NextcloudBackup.sh
Drop DB command PostgreSQL
[nextcloud-backup-restore.git] / NextcloudBackup.sh
index fb20a47877a3c231d4d2f586297643dfd2889687..3e08cb4151dde6690d07ec1e26f034a47968105e 100644 (file)
@@ -123,7 +123,11 @@ echo
 # Backup DB
 #
 echo "Backup Nextcloud database..."
 # Backup DB
 #
 echo "Backup Nextcloud database..."
+# MySQL/MariaDB:
 mysqldump --single-transaction -h localhost -u "${dbUser}" -p"${dbPassword}" "${nextcloudDatabase}" > "${backupdir}/${fileNameBackupDb}"
 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
 
 echo "Done"
 echo
 

patrick-canterino.de