diff --git a/scripts/restore b/scripts/restore index 68f750e..300f8e9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -29,6 +29,13 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory chown -R $app:www-data "$data_dir" +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the MySQL database..." --weight=1 + +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql + #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= @@ -38,8 +45,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql - #================================================= # GENERIC FINALIZATION #=================================================