- Railway CLI is installed, so we can get the environment variables pointing to the database. See https://docs.railway.app/guides/cli
- Postgres binaries 15 or later (or at least as current as Railway's version) are installed (for pg_dump). See https://blog.railway.app/p/postgre-backup
- railway link
- Link to the Ensembler project
- railway service
- Use the Ensembler service
- railway shell
- echo $PGPASSWORD
- pg_dump -U $PGUSER -h $PGHOST -p $PGPORT -W -F t $PGDATABASE > database-railway-<today's date>.dump
- exit