diff --git a/scripts/restore b/scripts/restore index f754d81..7820e04 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,6 +70,8 @@ sudo cp -a ./sources "$final_path" # Set permissions sudo chown -R $app: "$final_path" +sudo chmod -R a+rx /home/yunohost.backup/tmp + # Set UTF8 encoding by default sudo su -c "psql" postgres <<< \ @@ -81,12 +83,19 @@ sudo su -c "psql" postgres <<< \ sudo su -c "psql" postgres <<< \ "update pg_database set datistemplate='true' where datname='template1';" +# Copy postgresql dump +sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path + # Restore db ynh_psql_create_db_without_password "$app" +sudo systemctl restart postgresql sudo su - postgres <