From bcc77f6ed9358afad91531b84e208b7bdad3cc3a Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 17 Apr 2024 18:41:30 +0200 Subject: [PATCH] Add PostgreSQL database restoration --- scripts/restore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/restore b/scripts/restore index 3e534d4..b6c8bee 100755 --- a/scripts/restore +++ b/scripts/restore @@ -55,6 +55,13 @@ chmod 750 "$data_dir" chmod -R o-rwx "$data_dir" chown -R "$app:www-data" "$data_dir" +#================================================= +# RESTORE THE POSTGRESQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the PostgreSQL database..." + +ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================