Skip to content

How to migrate a server

Matthew Landauer edited this page Jun 20, 2014 · 7 revisions
  • Drop DNS TTL down to 300
  • Wait
  • Drop DNS TTL down to 60

On source server (

  • Clear out some old backups in /backups to make room on disk (if necessary)
  • Put first server into read-only maintenance mode
  • Wait for background jobs to finish (or kill them if they're taking a long time)
  • service stop morph-worker
  • cd /var/www/current; bundle exec rake app:backup
  • Wait about fifteen minutes

On destination server

  • rsync root@[ip of source server]:/var/www/current/db/backups/morph_backup.tar --progress
  • service stop morph-worker
  • service stop redis
  • cd /var/www/current; bundle exec rake app:restore
Clone this wiki locally