@@ -4,6 +4,8 @@ excerpt: 'How we migrated from expensive Heroku dynos to a self-managed DigitalO
44category :
55 name : ' Cloud'
66 slug : ' cloud'
7+ coverImage : ' /images/posts/replacing-heroku-with-self-hosting.png'
8+ ogImage : ' /images/posts/replacing-heroku-with-self-hosting.png'
79date : ' 2026-03-03'
810publishedAt : ' 2026-03-03T10:00:00Z'
911updatedAt : ' 2026-03-03T10:00:00Z'
@@ -46,7 +48,7 @@ Add-ons:
4648- Heroku Redis Premium-0 ($60) = $60
4749- Heroku Data for Redis ($15) = $15
4850- SSL Certificates (SNI included) = $0
49- - Papertrail Fixa ($7) = $7
51+ - Papertrail ($7) = $7
5052
5153Data Transfer:
5254- Outbound data (~500GB/mo) = ~$200
@@ -225,9 +227,18 @@ pg_restore --verbose --clean --no-acl --no-owner \\
225227For Redis, we chose to start fresh since it was just cache. If you need to migrate:
226228
227229``` bash
228- # Using redis-cli to export/import
229- redis-cli --rdb heroku-redis.rdb
230- redis-cli --pipe < heroku-redis.rdb
230+ # Save RDB snapshot from Heroku Redis
231+ redis-cli -h < heroku-redis-host> -p < port> -a < password> --rdb heroku-redis.rdb
232+
233+ # On your new server, stop Redis temporarily
234+ sudo systemctl stop redis
235+
236+ # Replace dump.rdb with your backup
237+ sudo cp heroku-redis.rdb /var/lib/redis/dump.rdb
238+ sudo chown redis:redis /var/lib/redis/dump.rdb
239+
240+ # Restart Redis to load the data
241+ sudo systemctl start redis
231242```
232243
233244### Phase 3: Application Migration (Day 2-3)
0 commit comments