Menu

A 6-Minute Production Server Swap — rsync Twice and Move the Sessions Too
📰

A 6-Minute Production Server Swap — rsync Twice and Move the Sessions Too

DEV Community: aws·sunah kim·7 days ago
#1u6dUiU2
#devtoaws#devto#dev#server#maintenance
Reading 0:00
15s threshold

Introduction

I replaced a production e-commerce server running Amazon Linux 2 (PHP 8.2 / mod_php) with a new Amazon Linux 2023 instance (PHP 8.3 / php-fpm). The database is a managed service shared by both, so the only things to move were code, uploaded files, sessions, and templates edited through the admin panel.

The result: the maintenance page was up for about 6 minutes, and because I moved the login sessions too, customers who were logged in across the cutover just kept working. The thing that made it smooth was splitting the runbook into three scripts — pre / final / verify .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.