Mastodon commands

Show log
$ journalctl -xf -u mastodon-*

Start instance
$ systemctl start mastodon-*.service

Stop instance
$ systemctl stop mastodon-*.service

Status of instance
$ systemctl status mastodon-*.service

Enter rails console
$ RAILS_ENV=production bundle exec rails c

Switch to mastadon user
$ sudo su - mastodon

Enter postgres
$ psql

Show databases
=> \l

Quit postgres
=> \q

Backup postgres
sudo -u postgres pg_dump mastodon_production > mastodon_production.sql