Heroku

Restore database from dump

  1. Verify account:  https://api.heroku.com/account 
  2. Enable backups: heroku addons:add pgbackups:basic
  3. Import data: heroku pgbackups:restore DATABASE http://public.host/file.sql

Install SQL Console

heroku plugins:install git://github.com/ddollar/heroku-sql-console.git

Run with heroku sql.

Heroku quickstart

  1. heroku auth:login
  2. heroku create --remote staging
  3. git config heroku.remote staging
  4. get AWS keys:  https://portal.aws.amazon.com/gp/aws/securityCredentials
  5. heroku config:set S3_BUCKET_NAME=bucket S3_HOST_NAME=host AWS_ACCESS_KEY_ID=key AWS_SECRET_ACCESS_KEY=secret
  6. git push staging master
  7. populate the database:
    1. heroku run rake db:migrate
    2. OR
    3. heroku addons:add pgbackups:basic
    4. heroku pgbackups:restore DATABASE 'http://remote/file.dump'
  8. heroku open

heroku logs --tail

heroku domains:add example.com

heroku run console

Deploy static site

heroku create --buildpack git://git.source.metacode.biz/heroku-buildpack-static.git

Rename an app

heroku apps:rename newname

Clear the database

heroku pg:reset DATABASE

Disable app

heroku ps:scale web=2