I'm trying to upgrade my heroku db, but the command the help section tells me to use:
https://devcenter.heroku.com/articles/upgrade-heroku-postgres-with-pgbackups
Is not available on my tools.
Here's the commands I've input so far:
pc$ heroku addons:add pgbackups
Adding pgbackups on heroku-app-1111... done, v152342344 (free)
You can now use "pgbackups" to backup your databases or import an external backup.
Use `heroku addons:docs pgbackups` to view documentation.
pc$ heroku addons:add heroku-postgresql:hobby-basic
Adding heroku-postgresql:hobby-basic on heroku-app-1111... done, v14434455 ($9/mo)
Attached as HEROKU_POSTGRESQL_BROWN_URL
Database has been created and is available
! This database is empty. If upgrading, you can transfer
! data from another database with pgbackups:restore.
Use `heroku addons:docs heroku-postgresql` to view documentation.
pc$ heroku maintenance:on
Enabling maintenance mode for heroku-app-1111... done
pc$ heroku ps:scale worker=0
Scaling dynos... done, now running worker at 0:1XX.
pc$ heroku pgbackups:transfer HEROKU_POSTGRESQL_BROWN
! `pgbackups:transfer` is not a heroku command.
! See `heroku help` for a list of available commands.
Listing the commands for heroku pgbackups effectively does not have the transfer command. Any ideas?
Your Heroku client is out of date. Run 'heroku update'. I know that pgbackups:transfer is not available in 3.3.0 and it is available in 3.8.4.
I'm assuming you want to clone your current database to a new database that you've added onto your app?
Below, assume HEROKU_POSTGRESQL_PINK
is your original database, and HEROKU_POSTGRESQL_BROWN
is the new one you just added.
Then the steps you want to do are the following:
heroku pgbackups:capture HEROKU_POSTGRESQL_PINK
URL=$(heroku pgbackups:url HEROKU_POSTGRESQL_PINK) && heroku pgbackups:restore HEROKU_POSTGRESQL_BROWN $URL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With