I have a production server and a staging server (droplets) with Digital Ocean. I want to switch them around using a reserved (floating) IP address (once I’ve got AWS S3 and CloudFront CDN working) so the staging server will become production and vice versa. This will also allow me to switch over easily in future for better resilience.
I think I understand how this all works but I want to sanity check I’ve got it right. This is the basic plan:
- Create a reserved IP on the production server.
- Change the production domain’s DNS record to point to the reserved IP. Allow time for the DNS change to propogate.
- When the DNS changes are complete, take the production server offline, back it up and restore to the staging server so it’s a replica of the production site.
- Rebake the restored posts on the staging server and generally do what’s necessary to get everything available in the S3 bucket (instructions elsewhere, I know).
- Switch the reserved IP to the fully restored, S3 and CDN enabled staging server to make it the production server and start Discourse.
Have I missed anything? Are there easier methods to achieve any of these steps?
Having the reserved IP in place and working means that if anything goes wrong with the rebake etc, I can switch back to the original production server while I sort out the problem.