Go to file
dump_stack() 990ecbd67e
Installation notes
2023-01-10 15:29:32 +00:00
patches Initial 2023-01-09 13:13:56 +00:00
.gitignore Initial 2023-01-09 13:13:56 +00:00
LICENSE Initial 2023-01-09 13:13:56 +00:00
README.md Installation notes 2023-01-10 15:29:32 +00:00
configuration.nix Add tmux 2023-01-10 14:09:32 +00:00
disable-services.nix Disable postgresql backup 2023-01-09 23:03:52 +00:00
mastodon.nix postgresql backups 2023-01-09 22:41:57 +00:00
secrets.nix.example Initial 2023-01-09 13:13:56 +00:00

README.md

lor.sh

Installation notes

  1. Prepare the new machine (man nixos)
git clone https://code.dumpstack.io/infra/lor.sh.git /mnt/etc/nixos
nixos-generate-config --root /mnt
sed -i 's/imports = \[/imports = \[\n.\/disable-services.nix/' /mnt/etc/nixos/configuration.nix
vim /mnt/etc/nixos/secrets.nix
nixos-install --no-root-password
reboot
  1. Change DNS A record

  2. Dump the database on the old machine

systemctl stop 'mastodon-*'
su - mastodon
pg_dump -Fc mastodon_production -f backup.dump
  1. Load the database and start the server
sudo -u mastodon pg_restore -Fc -U mastodon -n public --no-owner --role=mastodon -d mastodon backup.dump
sed -i '/disable-services/d' /etc/nixos/configuration.nix
nixos-rebuild switch
su - mastodon -s "$(which bash)" -c 'mastodon-env tootctl feeds build'