Addons for standalone heroku postgres database - heroku

Is it possible to attach addons to a standalone postgres database created at https://postgres.heroku.com ? I'm using the dev plan.
The database details page # https://postgres.heroku.com/databases/ shows "Heroku PG-Backups addon not attached" under Snapshots heading. I couldn't find a way to add the PG-Backups addon.

You probably need to take a look at the docs: https://devcenter.heroku.com/articles/pgbackups#provisioning-the-add-on

Related

Turn off Heroku Postgres database

How can I turn off Postgres database addon on a Heroku app? I have looked in various questions on SO and also visited Heroku documentation but was unable to find any help related to this.
You can reset the database, destroy the database or remove the addon on heroku, but then you lose all your data. Unless you made a backup.

How to query heroku database from salesforce (eg. via vf page)

can anyone help me on this? How can I achieve the following:
I need to set up a prototype integration with heroku from salesforce application. The need is to store a huge volume of data in a single heroku table and accessble from salesforce - eg: have a vf page in salesforce which queries the data in realtime
We're doing this. We use Heroku connect. We created a salesforce custom object and bidirectionally synched it using Heroku connect. You can then update the data on either side (in salesforce or in Heroku:PG).
But Heroku connect is expensive & priced on a # of synchs per month.
https://www.heroku.com/connect
Firstly, heroku is not a database. It is a PAAS.
My approach would have been :
- Create a heroku app(this is a link to create a node.js app) link
- After you create the app choose one of the datastore addons -> link if you want a SQL/Column oriented Database choose heroku postgres or ClearDB Mysql
- Secondly you actually need a webserver that exposes this database to you. I am thinking you would make this a webservice of some sort. You can build that in node.js. Here is something that will get you started or give you an idea - link

Getting issue to add herokuconnect addon

Please have a look.
rails#rails-desktop:~/rails/app$ heroku addons:add herokuconnect
Adding herokuconnect on app... failed
! That add-on plan is only available to select users.
I am unable to add this add-on.
Please describe that what is the issue.
Actually looks like heroku-postgresql has been updated to heroku-postgresql:hobby-dev
liango#LENOVO-PC D:\lianxi\shouter
> heroku addons:create heroku-postgresql:hobby-dev
Creating postgresql-globular-2767... done, (free)
Adding postgresql-globular-2767 to whispering-meadow-8682... done
Setting DATABASE_URL and restarting whispering-meadow-8682... done, v4
Database has been created and is available
! This database is empty. If upgrading, you can transfer
! data from another database with pg:copy
Use `heroku addons:docs heroku-postgresql` to view documentation.
liango#LENOVO-PC D:\lianxi\shouter
>
Give one try to add this addon from Heroku Addon Dashboard Interface.
This is because Heroku connect is available to selected business users.
And you have to tell business purpose to Heroku for using Heroku connect to get this addon.

phpPgAdmin for Heroku database

When I create an app in Heroku and add a database (PostgreSQL) to it, is there a way to add a web interface for that database (such as phpPgAdmin)?
I'm no expert, but I think you can't have this functionality. Have a look at the monitoring section; in case you want to get some logs. Furthermore it's worth checking Heroku Postgres add-on section. There you can find details about different plans e.g. they include different features.
However, there is a way to connect to Postgres database on Heroku using pgAdmin [not web interface] as answered in this SO Question and this DBA Stackexchange.
Hope this helps until some extend.
If you do not mind running the web interface locally, you can use phppgadmin to manage the Heroku postgreSQL db.
This is easily done by spinning a docker container.
docker pull dockage/phppgadmin
docker run --name=phppgadmin-heroku -d --publish=81:80 -e PHP_PG_ADMIN_SERVER_HOST=<your_db_url_from_heroku> -e PHP_PG_ADMIN_SERVER_DEFAULT_DB=<your_db_name_from_heroku> -e PHP_PG_ADMIN_OWNED_ONLY=true dockage/phppgadmin:latest
This will run the phppgadmin on http://localhost:81. Of course, the same container could be deployed on Heroku, if a local deployment is not enough for your needs.

How do I use my Sinatra-powered Ruby application to scrape data to a Heroku PostgreSQL database

I successfully pushed my Sinatra-powered Ruby app to Heroku.
One of the files I pushed is a Ruby script which scrapes the web and puts data into a PostgreSQL database (that's the non-Sinatra one).
I set up a PostgreSQL add-on for the Heroku app, but I haven't gotten further than that.
What I'm trying to figure out is how I'd edit the scraping script (which uses the Sequel gem) to add the data it scrapes to the Heroku PostgreSQL add-on database.
I took a look this tutorial on it, but I got stuck on the first step. I'm afraid I don't understand the command prompt syntax they listed.
Furthermore, when I tried to follow their alternate instructions using PGAdmin III, I ran into another problem. The Heroku tutorial says:
As an alternative, you can also create an a dump file using the PGAdmin GUI tool. To do so, select a database from the Object Browser and click Tools > Backup. Set the filename to data.dump, use the “COMPRESS” format, and (under “Dump Options #1”) choose not to save Privilege or Tablespace.
The problem here is I see no "COMPRESS" format in PGAdmin. Instead, I just save the file "data.dump" as an "All files" type without any formatting.
I'm not sure if this is correct, and if it is, what exactly I need to do next.
Can anyone confirm that I'm on the right path, and if so, what specifically I must do next?
EDIT: For clarification, I'm trying to get my scraping script to add its scraping data to the Heroku app's PostgreSQL database. Right now, it's still written as if it were on my local machine, scraping to my local PostgreSQL database.
It looks like you can run
heroku pg:credentials DATABASE --app your-app-name
where "DATABASE" is literally the word "DATABASE". Once you have the credentials, configure your script to access that database.

Resources