Help migrating an instance


#1

Since the production guide on GitHub is outdated, I’m not quite sure how to migrate an instance.

Is it just matter of following the installation guide, copying the system folder, running psql mastodon_production < dump.sql as postgres user and then instead of RAILS_ENV=production bundle exec rake mastodon:setup copying the .env.production file and running RAILS_ENV=production bundle exec rails assets:precompile and RAILS_ENV=production bin/tootctl feeds build ?


#2

you should generally copy over the redis database as well instead of using feeds:build, it’s much quicker and preserves some non-critical usage statistics


#3

Do I also have to run RAILS_ENV=production bundle exec rails db:migrate?


#4

db:migrate is used when migrating from one version of the database schema to another version of the database schema. If you use the same database and the same code, then there’s no change that needs to be made to the schema


#5

I migrated and I believe there was an issue restoring my database. My original dump is 321MB, but dumping it after restoring it dumps on 68MB.
The services start, but when I go to my instance, the Mastodon 500 error shows up.


#6

I dropped the database and tried it again and these are the errors. I changed default system locale from en_US to en_US.UTF-8 and the error persists.




#7

It’s fixed. I just needed to do update mastodon_production set encoding = pg_char_to_encoding('UTF8') where datname = 'mastodon_production'


#8

This topic was automatically closed 6 hours after the last reply. New replies are no longer allowed.