Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

heroku upgrade phobby basic$

This answer assumes that you're using Heroku CLI. Any instance of "YOUR_APP_NAME" in a command should be replaced by the application name of the Heroku App you're working with.

You will also need on hand the connection URL (shown here as DATABASE_URL) of your current hobby-dev database to be upgraded.

1. Provision a new hobby-basic database:

heroku addons:create heroku-postgresql:hobby-basic -a YOUR_APP_NAME

This will output a name for the new database containing a color. You will need to refer to this later. For example:

HEROKU_POSTGRESQL_PINK_URL

2. Optionally put db into maintenance mode to ensure that no data is added to the db while it's being copied.

heroku maintenance:on --app YOUR_APP_NAME

3. Copy the existing hobby-dev db to the hobby-basic db

heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_PINK --app YOUR_APP_NAME

Heroku will now print the following message.

heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_PINK --app YOUR_APP_NAME

!    WARNING: Destructive Action
!    Transfering data from DATABASE_URL to HEROKU_POSTGRESQL_PINK
!    This command will affect the app: YOUR_APP_NAME
!    To proceed, type "YOUR_APP_NAME" or re-run this command with --confirm YOUR_APP_NAME

YOUR_APP_NAME
4. Confirm db transfer by typing the actual name of your application

YOUR_APP_NAME

5. Promote your new database

heroku pg:promote HEROKU_POSTGRESQL_PINK --app YOUR_APP_NAME

The color-based name of the database you promote should be copied from the output you got up in step 1. Do not copy and paste the line above word for word, it will not work.

6. If you put your db into maintenance mode earlier, turn it off.

heroku maintenance:off --app YOUR_APP_NAME
Comment

PREVIOUS NEXT
Code Example
Shell :: ubiquiti cli set compliance 
Shell :: how to install multiple linux package in one line 
Shell :: get all the apps installed on the phone command 
Shell :: lubuntu boot customize 
Shell :: download official emcascripten github repo 
Shell :: invert grep 
Shell :: how to add new path to sudoers 
Shell :: change default browser is not working in manjaro 
Shell :: zsh command not found scp 
Shell :: screen set env variables 
Shell :: git delete branch error not found 
Shell :: git roll back to a point 
Shell :: sudo apt install powerman 
Shell :: autostart syncthing (replace myuser with your username) 
Shell :: preserve bash history 
Shell :: cvauc install package source 
Shell :: gem install puma 
Shell :: copy scp from Windows to Ubuntu with credentials 
Shell :: c# tostring 2 digit hex 
Shell :: can i setup 2fa for my ubuntu ssh 
Shell :: Filter Up Hosts 
Shell :: Shell command, operator and separator/control characters: 
Shell :: shell command operator and seperator control characters 
Shell :: output format is WPS Path to intermediate files is ./ ERROR: edition_num: unable to open GRIBFILE.AAA 
Shell :: masking 
Shell :: chow install cal inlunix 
Shell :: export installed application using cmd 
Shell :: how to do copy all using cp command in linux 
Shell :: check_mk ubuntu 20.04 
Shell :: Set $FOO to val if unset (or null) 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =