Heroku PGBackups - cannot see daily backups when running "heroku pg:backups" - postgresql

This question was asked on 3/15/2015.
I read https://devcenter.heroku.com/articles/heroku-postgres-backups and learnt how to capture backups or schedule daily backup.
I used "heroku pg:backups schedule --at='02:00 EDT' DATABASE_URL --app MYAPPNAME" to set a daily backup of my app. However, two days later I could not find any daily backups.
To be more specific, when I used "heroku pg:backups" (devcenter.heroku.com/articles/heroku-postgres-backups#checking-backup-status), I saw "=== Backups ..." (backups I manually made would list there), but I did not see "=== Schedule DATABASE_URL: daily".
Heroku Toolbelt had the newest version.
I had heroku-postgresql as an add-on.
I did not have "PG Backups as an add-on", since it was deprecated (devcenter.heroku.com/changelog-items/623).
I am wondering if that is because my app is a personal app and it does not have the support of daily support, but I cannot find related information. This was answered by jcuenod.
Now my question is I cannot see daily backups when I run "heroku pg:backups".
Thanks
"heroku addons" gave me:
=== myapp Configured Add-ons
heroku-postgresql:hobby-dev HEROKU_POSTGRESQL_AQUA
"heroku pg:backups schedules" gave me:
=== Backup Schedules
HEROKU_POSTGRESQL_AQUA_URL: daily at 2:00 (America/New_York)
"heroku pg:backups" gave me:
=== Backups
ID Backup Time Status Size Database
---- ------------------------- ---------------------------------- ------ --------
b003 2015-03-15 17:53:51 +0000 Finished 2015-03-15 17:54:11 +0000 75.9kB AQUA
b002 2015-03-14 16:44:02 +0000 Finished 2015-03-14 16:44:15 +0000 75.8kB AQUA
b001 2015-03-13 20:26:33 +0000 Finished 2015-03-13 20:26:39 +0000 75.2kB AQUA
=== Restores
b001, b002 and b003 are all backups I manually made.
Heroku updated their tutorial (h_t_t_ps://devcenter.heroku.com/articles/heroku-postgres-backups) on 3/18/2015.
Heroku updated their tutorial (h_t_t_ps://devcenter.heroku.com/articles/heroku-postgres-backups) on 3/19/2015, again.

On https://devcenter.heroku.com/articles/heroku-postgres-plans I see
All tiers share the following features:
...
Daily logical database backups with PG Backups (optional but free)
The syntax you are using looks right.
Also, when I run heroku addons, I get
=== myapp Configured Add-ons
heroku-postgresql:hobby-dev HEROKU_POSTGRESQL_GOLD
pgbackups:plus
What is the output of heroku pg:backups schedules?

Related

How can I access the Heroku Postgres Database copy?

I was one of the users who had their free DB deleted. I notice they left me with a DB copy when I run heroku pg:backups as you can see below:
(venv) MacBook-Pro-4:TheDropCore adamlamorre$ heroku pg:backups
› Warning: heroku update available from 7.60.2 to 8.0.1.
=== Backups
No backups. Capture one with heroku pg:backups:capture
=== Restores
No restores found. Use heroku pg:backups:restore to restore a backup
=== Copies
ID Started at Status Size From To
──── ───────────────────────── ─────────────────────────────────── ──────── ───────── ───────────
c001 2021-11-22 02:49:15 +0000 Completed 2021-11-22 02:49:33 +0000 120.00KB From Name Target Name
How do I access c001 and apply it to a new DB?

Postgres Restore taking ages (days)

I've been working on a backup / restore for a Postgres server for quite a while now. It's an Azure Windows Virtual Machine (Windows server 2012).
The database isn't that big (near 5Gb), but the restore takes (literally) days. I've tried (several) times with different settings to restore the database, but all of the times it took days to "finish" (it didn't finish - I killed the process because I didn't see anything happening, that's why I'm running the job verbose this time).
I've now been running the job (verbose one) for 5 days straight and still it isn't finished. It's inserting rows (or at least displaying the rows), but it's still running.
Currently I'm using this command:
pg_restore -Fc -v --jobs=2 --host=localhost [filename]
Jobs is set at 2 because it's a dual core server. Like I said: different settings still very very slow.
What is wrong - should I be "tuning" the database before the restore or what?
This is a test-server setup. When we're doing with the test the current data need to be restored (again) to the new production server: we can't afford to wait days on end before the production environment comes online.
It's not pushing errors into the logs or something - it just keeps running and running and running...
So what am I doing wrong?

how to take heroku postgress DB backup on remote location?

hi I take backup of my heroku database using PGBackups but its provide me backup on there pre define places .now I wont to take that backup on my remote location folder on S3 or some other remote storage.
how can we do that periodically like every week or month it's own/automatically.
my app on Ruby on Rails help me to achieve this.
The latest backup is always available to you by entering heroku pgbackups:url. So, set up a cron job or the equivalent that fetches that URL once a week or once a day.
You could write a rake or Ruby script and call it with Heroku Scheduler (a free addon), or use a different remote machine to pull the backup, or do a shell script and:
curl -O `heroku pgbackups:url`
Here is a Gem that appears to do what you want: https://coderwall.com/p/w4wpvw

What is the difference between Heroku Postgres DBs HEROKU_POSTGRESQL_AMBER and HEROKU_POSTGRESQL_GOLD?

I created a new Heroku app, and then attached the Dev Heroku Postgres db to it.
In the app's activity log, I see:
v07 : Attach HEROKU_POSTGRESQL_GOLD resource 5 minutes ago
v06 : Deploy 076b03a 19 minutes ago
v05 : Add config 19 minutes ago
v04 : Add DATABASE_URL config 19 minutes ago
v03 : Attach HEROKU_POSTGRESQL_AMBER resource 19 minutes ago
v02 : Enable Logplex 21 minutes ago
v01 : Initial release 21 minutes ago
So the GOLD db must be the Dev version I added. What is AMBER?
When you deployed your app initially, we automatically provision one database for you (a dev) if you need it (we detect for example the pg gem in your Gemfile, if this is a ruby app. This would be HEROKU_POSTGREQL_AMBER, which we also happened to set as your DATABASE_URL
Consequently, you manually provisioned another database, HEROKU_POSTGRESQL_GOLD, presumably via heroku addons:add heroku-postgresql.
My guess is you're using HEROKU_POSTGRESQL_AMBER because it must be set to the value of DATABASE_URL. To verify this, try heroku config --app <your-app> | grep postgres. You could also just run heroku pg:info --app <your-app> to check all databases installed on your app, and also verify which is your primary (DATABASE_URL).
You can then remove the spare with heroku addons:remove HEROKU_POSTGRESQL_<COLOR-OF-THE-SPARE-MOST-LIKELY-GOLD>.

Unable to Reset Heroku Shared Database

I'm trying to reset my shared database on Heroku.
I've tried the following commands:
heroku pg:reset DATABASE
heroku pg:reset SHARED_DATABASE
heroku pg:reset SHARED_DATABASE_URL
heroku pg:reset DATABASE_URL
Every time I receive the error "Resource not found" despite these being in my environment vars (heroku config) and working with my application.
Anyone know what I could be doing wrong? Thanks!
I just got this feedback from Heroku support:
Hi, this is due to a bug in the heroku client. An updated release should be out later today >or monday.
You may want to instead take this opportunity to try out the new dev databases:
https://postgres.heroku.com/blog/past/2012/4/26/heroku_postgres_development_plan/
June 08, 2012 09:47
Looks like you have to wait around or use the dev databases.