Find a recent NixOS AMI. Use a x86_64 (t3, not t2) instance type to enable serial console. Install SSH public key during installation and log in using public IP.
nixos-rebuild --flake .#venus --target-host root@venus boot
To restore database from backup, assumes rclone
and aws
credential files in place:
-- create schema in database strykeforce
CREATE ROLE "strykeforce";
CREATE SCHEMA IF NOT EXISTS "strykeforce" AUTHORIZATION "strykeforce";
# data
aws s3 cp s3://www.strykeforce.org/sql/strykeforce.sql.gz .
zcat strykeforce.sql.gz | psql -d strykeforce
# images and documents
rclone -v sync s3://www.strykeforce.org/media/ ./media
./manage.py wagtail_update_image_renditions
# as root
# strykeforce-manage is installed on the production server
$ strykeforce-manage help