diff --git a/scripts/restore b/scripts/restore index 965f6f0..63ce6ee 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,9 +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 - +# Debug sudo ls -alh "$final_path" # Change directory for create user & database postgresql @@ -104,7 +103,16 @@ RAILS_ENV=production bin/bundle exec rails assets:precompile RCOMMANDS # restore database -sudo psql mastodon_production < $YNH_APP_BACKUP_DIR/mastodon_db.sql +sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path + +sudo su - $app <