diff --git a/scripts/restore b/scripts/restore index 1340796..a57a33f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -101,8 +101,19 @@ RAILS_ENV=production bin/bundle exec rails db:migrate RAILS_ENV=production bin/bundle exec rails assets:precompile RCOMMANDS -# restore database -sudo psql mastodon_production < $YNH_APP_BACKUP_DIR/mastodon_db.sql +# copy database dump +sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path +sudo chmod a+r $final_path/mastodon_db.sql + +# Restore database dump +sudo su - $app <