...
Install heroku CLI on my Mac
Run
heroku login
to auth heroku CLI on my local machineCreate scihist-digicoll app in heroku dashboard
Provision
heroku postgres
add-on. For now we’re going to do ahobby-basic
at $9/month, although this won’t be enough for production, we plan astandard-0
at $50/month eventually. https://elements.heroku.com/addons/heroku-postgresqlImport database from our staging instance to our heroku db (https://devcenter.heroku.com/articles/heroku-postgres-import-export)
Do a new export on staging, since heroku asks for a certain format
Tricky cause
pg_dump
doesn’t live on staging jobs server! Need to figure out how to ssh to database server maybe… ok can find it in EC2 console, and ssh there asjrochkind
. Now need to figure out how to connect to database… can’t find database backup cronjob on database server, what user does it run under? not in ansible… but managed topg_dump
using credentials from local_env.yml on staging.Per heroku instructions, we need to put it on a private S3 bucket. We’ll use chf-hydra-backup, file
digcol-for-heroku.dump
. (Pretty slow to upload from my local network, figuring out how to put it in private bucket from the database server itself is beyond me right now though)Having trouble getting a properly signed URL to that location! hackily reverse engineered from S3 console, not the right way, but getting me there.
Succesfully imported!
heroku pg:psql -a scihist-digicoll
drops me into PSQL console where I can see tables and data to confirm. Deleted extra backup from our S3 bucket.
Mon Oct 5
Heroku has a LOT of docs, usually well-written. It is pretty well googled. Some heroku overview and getting started docs:
...