Move a site to a new VPS with zero downtime
The order matters more than the tools. My sequence:
— Drop the TTL on your DNS record to 300s a day BEFORE you start
— rsync files to the new box: rsync -avz --delete /var/www/ deploy@newbox:/var/www/
— Dump and import the DB, then do ONE final rsync at cutover for changed files
— Test the new box by editing your local /etc/hosts to point at its IP — verify before the world sees it
— Flip DNS, watch both access logs, kill the old box after 48h
Low TTL is the unsung hero. Try it tonight.
Root Access Daily
@RootAccessDaily
Move a site to a new VPS with zero downtime
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.