Pgbackups: transfer is not a heroku command

I am trying to update my db heroin, but the command in the help section tells me to use:

https://devcenter.heroku.com/articles/upgrade-heroku-postgres-with-pgbackups

Not available in my tools.

Here are the commands that I have entered 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.

The command list for heroku pgbackups effectively does not have a transfer command. Any ideas?

+4
source share
3 answers

I assume you want to clone your current database into a new database added to your application? Below it is assumed that HEROKU_POSTGRESQL_PINK- this is your original database, and HEROKU_POSTGRESQL_BROWN- this is the new one that you just added.

Then the steps you want to take are as follows:

  • back up your old database in your application heroku pgbackups:capture HEROKU_POSTGRESQL_PINK
  • URL=$(heroku pgbackups:url HEROKU_POSTGRESQL_PINK) && heroku pgbackups:restore HEROKU_POSTGRESQL_BROWN $URL
  • , , .
+2

Heroku . 'heroku update'. , pgbackups: 3.3.0 3.8.4.

+3

:

1)

heroku pgbackups: capture --expire

2) id

heroku pgbackups

3) URL- ( - b020)

heroku pgbackups: URL

4)

heroku pgbackups: HEROKU_POSTGRESQL_NEWCOLOR " https://your-pgbackup-url.com"

5) db

heroku pg: promote HEROKU_POSTGRESQL_NEWCOLOR

+2
source

Source: https://habr.com/ru/post/1539615/


All Articles