market-db holds the catalogue, and the app finds it through the parameter /market/db/endpoint. On the app server app, /opt/market/db-password holds the master password (user market, database market), and /opt/market/cleanup.sql is the intern's new nightly cleanup. It has never been run.
- Before anything else: keep automated backups for 7 days, protect
market-dbfrom being deleted, and take a manual snapshotmarket-db-before-cleanup. Wait until the snapshot isavailable. - Note the current time in UTC, as
T=$(date -u +%Y-%m-%dT%H:%M:%SZ). Then start a session onapp, install the PostgreSQL client, and run the cleanup against the database. Count how many monsters it deleted. - Restore
market-dbas it was just before the cleanup into a new instance,market-db-restored, in the same subnet group and security group. The newest moment you can restore to is about five minutes ago, so wait untilLatestRestorableTimeis past the time you noted. - Check from
appthat the restored database has the whole catalogue. - Point the app at the restored database.