How to restore specific tables on heroku from backup
- Create a new database instance attached to current application
- Restore latest database backup on newly created database
- Get the connection url of this backup database. Use this URL in later sql queries.
- Connect to database where we have incorrect data
heroku pg:psql --app ck-api-prod
- On postgres prompt run following queries. This will create copy table from data in backup database.