Closed croaky closed 4 years ago
That's a good point about helping users of the gem clean up.
I think I'm personally going to switch from Parity to individual shell scripts that live in the repo and have no arguments, as documented below in case any of these ideas are useful for the maintainers for future PRs.
Create backup of production follower:
./bin/db_backup_prod_follower
Restore staging from production backup. The script puts staging in maintenance mode and post-processes some data via heroku pg:psql
:
./bin/db_restore_staging_from_prod_backup
Create backup of staging:
./bin/db_backup_staging
Download staging backup:
./bin/db_download_staging_backup
Restore development from downloaded backup:
./bin/db_restore_dev_from_downloaded_backup
Optionally, clean up:
rm tmp/latest.backup
I haven't been able to use Heroku PG for almost a year now, so I've still found Parity very useful for general app management, but the PG cases have gotten quite complicated.
My current database takes about 10 minutes to fetch from Heroku. If the
pg_restore
fails for any reason, I don't want to re-fetch the dump.curl -o
will already overwritetmp/latest.backup
when it begins andtmp
is ignored in Git by default in Rails apps.It might be nice if Parity had a command to "restore from local backup" but in the meantime, this worked well for me: