I just received an email from Autobus saying that due to "Salesforce's complete and long-term failure to fulfill its obligations to us we have to stop our service starting December 1, 2022.".
That is very unfortunate as we don't really have an alternative add-on (Remora Offsite Backup starts at $75/month).
Does anyone know how to automatically backup Postgres database from Heroku automatically without Autobus help?
For now we have to setup scheduled backups using the Heroku CLI...
heroku pg:backups:schedule DATABASE_URL --at '20:00 America/Sao_Paulo'
More details at https://devcenter.heroku.com/articles/heroku-postgres-backups
HEROKU logs. That only shows me about 100 lines. Is there not a way to see complete logs for our application on HEROKU?
from heroku logs help:
-n, --num=num number of lines to display
or using heroku web dashboard - logs addon
So, I'm kind of new to Heroku. I have a small forum for a private community. New Relic tells me there was a 404 this afternoon. I want to find out the details of the request that returned that 404. What can I do?
You can look at the logs on Heroku with heroku logs.
However, Heroku only allows access to the most recent 1500 lines.
Heroku only stores the last 1500 lines of log history. If you’d like
to persist more than 1500 lines, use a logging add-on.
https://devcenter.heroku.com/articles/logging#log-history-limits
You should install one of the many logging add ons so that you can keep more log history.
When I run heroku pgbackups:restore DATABASE_URL x123 --confirm app_name
Everything seems to go smoothly in the console but the DB remains empy.
HELP!
Database stats such as table count are populated in the background. For the Starter tier that can be delayed by a few minutes. As #kch mentioned as well, there's some caching involved.
Stats for Production tier are updated more frequently, typically less than 1 minute.
I started a migration on Heroku last night that gave me no feedback for hours, and which I eventually stopped because it wasn't clear if the system was even doing anything.
Ever since, it's been a nightmare. I cannot access the relevant database tables in heroku console, I can't migrate, rollback, or use pgbackups.
Helpfully, pgbackups gave me a one line explanation just now:
a transfer is currently in progress
This I assume is the migration I tried to execute hours ago. How can I stop whatever Heroku is doing so I can do a quick restore and get back up and running?
You can remove the problem backup stuck in the "a transfer is currently in progress" by finding the name of the backup and then destroying it. E.g.
heroku pgbackups
My problem backup was listed like this:
b210 | 2013/01/02 12:29.33 | unknown | DATABASE_URL
So to destroy it I just did:
heroku pgbackups:destroy b210
It removed the problem backup for me so I could get on with using pgbackups again properly.
I just had this problem too. Found an easier way of fixing it - briefly remove the pgbackups addon.
heroku addons:remove pgbackups
heroku addons:add pgbackups
WARNING as mentioned in the comments below, this will destroy all extant backups!
I accidentally did a transfer from my COLOR_URL database to my DATABASE_URL which was the same database. heroku pgackups:transfer let this happen which caused the main database to get stuck in
a transfer is currently in progress
I fixed it by looking at the process list pg:ps and killing all connections pg:killall
After doing this and looking at pg:ps the process list was empty and I was free to use the main database again with pgbackups.
NOTE this could be a destructive operation so make sure you have a snapshot before you do this.
The real solution is to contact Heroku support and have them kill the rogue process for you. They say they are re-architecting pgbackups to give users more control.
It never became clear what happened - after a day or so I was able to interact with heroku console, but I was never able to run another migration. This is what I did:
Renamed my app to something else.
Created a new app in its place, checking the stack was the same, and copying over all add-ons and domains.
I restored the database from pgbackups (highly recommended if you're not using this add-on).
This fixed the problem. Note: Be careful to check that your pgbackup doesn't cause unacceptable data loss.