heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 382 forks source link

Can not remove PG:Backups schedule if original database deleted #1937

Open randyleighton opened 8 years ago

randyleighton commented 8 years ago

I have tried to remove pg:backups schedules on many apps where the database addon was destroyed but the schedule was not removed first. The schedule

I have an app with the following PG database: heroku pg -a appname === HEROKU_POSTGRESQL_PURPLE_URL Plan: Hobby-dev Status: Available ...

So the only database addon is the PURPLE. Lets take a look at the backups schedules:

heroku pg:backups schedules -a appname === Backup Schedules DATABASE_URL: daily at 2:00 (America/Los_Angeles) HEROKU_POSTGRESQL_GOLD_URL: daily at 2:00 (America/Los_Angeles)

I have a schedule for the database_url, so I am happy. Now let's try to remove the GOLD because it does not exist: heroku pg:backups unschedule HEROKU_POSTGRESQL_GOLD_URL -a g5-cms-igs7hgsf-g5-concierge-s ! Unknown database: HEROKU_POSTGRESQL_GOLD_URL. Valid options are: HEROKU_POSTGRESQL_PURPLE_URL

Can't remove the bad schedule.

willex commented 7 years ago

Hi, I experience the same problem. Is here a workaround or force to do this?

ransombriggs commented 7 years ago

@willex I checked the CLI code and there is not a good way to force this in the CLI given how the API works. Could you please file a bug report at https://support.heroku.com and the database team should be able to clean this for you / fix the underlying problem where schedules are not deleted when a database is removed.