(Mastodon Upgrade)
sudo cp /var/lib/redis/dump.rdb /tmp/backup.rdb
sudo su - mastodon
pg_dump mastodon_production > /tmp/backup.psqld cp live/.env.production /tmp/.env.production
sudo su - mastodon
cd live RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.4 rbenv global 3.0.4
git fetch && git checkout v4.0.2 bundle install yarn install
SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate RAILS_ENV=production bundle exec rails assets:precompile
exit sudo systemctl restart 'mastodon*' sudo su - mastodon cd live && RAILS_ENV=production bundle exec rails db:migrate
exit sudo systemctl restart 'mastodon*'