Skip to content

Restoring Database

davidheyman edited this page Oct 27, 2014 · 5 revisions

The Postgres database is automatically backed up every night. The backups are automatically uploaded to S3 (and later moved to Glacier archival storage).

To restore the database, locate the URL of the backup on S3. It will look something like imagine-rio/backup/<backup date>.gz

Download the file with:

aws s3 cp s3://imagine-rio/backup/1413871201000.gz backup.gz

The backup file automatically creates the rio database so it must be deleted first. Delete the rio database using:

sudo su
su postgres
dropdb rio
Clone this wiki locally