Skip to content

Instantly share code, notes, and snippets.

View f0rmatme's full-sized avatar
🏠
Working from home

James f0rmatme

🏠
Working from home
View GitHub Profile
@halilim
halilim / move_heroku_pg_to_aws_rds.md
Last active February 22, 2021 14:13
Move Heroku Postgres to Amazon AWS RDS
  1. Prepare your RDS instance and [authorize access to it][1] (basically make it public).

  2. Put your app in maintenance mode:

    heroku maintenance:on
  3. Save the latest SQL dump of the DB:

#!/bin/bash
MEMORY_MB_VLOW=8192
MEMORY_MB_LOW=32768
MEMORY_MB_NORMAL=65536
MEMORY_MB_HIGH=122880
SINGLE_SOCKET_CPU_CORES=18
TOTAL_CORES_MASK=ff,ffffffff,ffffffff
HOST_CORES_MASK=3ffff0,3ffff # 0b1111111111111111110000,0b00000000000000111111111111111111