Skip to content

Steps to migrate the production server

James Kent edited this page Sep 13, 2024 · 1 revision

So you're brave enough to migrate the production server, I'm here to hold your hand, it can be a little scary, but we will do it together. from my memory... from a couple hours and 7 salty tacos ago... sorry this guide may not be very complete.

Prepare!

  1. Back up the /var/www/ folder
  2. Back up any postgres databases into tar files. If they are docker volumes follow this guide
  3. Keep the network config files on hand (etc/netplan/50-cloud-init.yaml and /etc/ssh/sshd_config)
    • etc/netplan/50-cloud-init.yaml will have the network settings you need.
    • /etc/ssh/sshd_config really just you need to set PasswordAuthentication no, otherwise the computer gets quarantined, and we don't want that
  4. after the new drive is installed, use the UDC login stuff to manage the computer. (magic)
  5. boot from the ubuntu server ISO (https://ubuntu.com/download/server)
  6. if you noted down the network information, you can input the info during the setup, otherwise you will edit the netplan file later
  7. grab a coffee/taco and wait for the install to finish, then reboot
  8. edit the netplan & sshd_config files if necessary, then try pinging 1.1.1.1 and https://one.one.one.one
  9. install docker and copy the /var/www/ and postgres databases back to their appropriate folders.
  10. rebuild images and deploy!
Clone this wiki locally