Changing domain’s IP address when a remote service is actively using the domain.

Note that the remote service must support automatic queuing+re-delivering.

  1. Reduce DNS ip TTL from L to N minutes.
  2. Make snapshot A on the old instance and apply it to the new instance.
  3. Run the new instance and test it works fine.
  4. Make sure L minutes passed since step 1.
  5. — Downtime starts here —
  6. Stop the old instance and make data snapshot B from it.
  7. Rsync full snapshot B to the new instance (adding/updating/deleting the files).
  8. Change the DNS IP address to the new instance.
  9. — Downtime ends here —