From: DecaTec Date: Sat, 3 Jul 2021 08:17:58 +0000 (+0200) Subject: PostgreSQL encoding X-Git-Tag: v2.3.0~5 X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/commitdiff_plain/de92b58bf86c668baffda79a6be44ac26d1b0e36?ds=inline;hp=9131916ca452fc0b2f1d6fa118f3871cf0c765af PostgreSQL encoding --- diff --git a/NextcloudRestore.sh b/NextcloudRestore.sh index 7f6bd0a..ee6d44f 100644 --- a/NextcloudRestore.sh +++ b/NextcloudRestore.sh @@ -237,7 +237,7 @@ if [ "${databaseSystem,,}" = "mysql" ] || [ "${databaseSystem,,}" = "mariadb" ]; # TODO: Use this if the database from the backup DOES NOT use UTF8 with multibyte support (e.g. for emoijs in filenames): #mysql -h localhost -u "${dbUser}" -p"${dbPassword}" -e "CREATE DATABASE ${nextcloudDatabase}" elif [ "${databaseSystem,,}" = "postgresql" ] || [ "${databaseSystem,,}" = "pgsql" ]; then - sudo -u postgres psql -c "CREATE DATABASE ${nextcloudDatabase} WITH OWNER ${dbUser} TEMPLATE template0 ENCODING \"UTF8\";" + sudo -u postgres psql -c "CREATE DATABASE ${nextcloudDatabase} WITH OWNER ${dbUser} TEMPLATE template0 ENCODING \"UNICODE\";" fi echo "Done"