Difference between revisions of "EC2 server recovery"

From TS NoCode wiki
Jump to navigation Jump to search
Line 2: Line 2:
=== No SSL connections possible ===
=== No SSL connections possible ===


==== Changes in AWS ====
# Make a snapshot of the running server
# Make a snapshot of the running server
# Make a volume from the snap shot
# Make a volume from the snap shot
# Create a new server
# Create a new server
# Attatch the volume to machine /dev/sdf
# Attatch the volume to machine /dev/sdf
# Connect to new server


==== Connect to new server ====
# Install TS client tools
# Install TS client tools
# ts quick-install
# ts quick-install
Line 23: Line 24:
# sudo cp /mnt/oldroot/usr/share/tomcat8/conf/Catalina/localhost/* /usr/share/tomcat8/conf/Catalina/localhost
# sudo cp /mnt/oldroot/usr/share/tomcat8/conf/Catalina/localhost/* /usr/share/tomcat8/conf/Catalina/localhost
# ts start-webserver
# ts start-webserver
# Ensure server is running

Revision as of 00:17, 10 January 2025

No SSL connections possible

Changes in AWS

  1. Make a snapshot of the running server
  2. Make a volume from the snap shot
  3. Create a new server
  4. Attatch the volume to machine /dev/sdf

Connect to new server

  1. Install TS client tools
  2. ts quick-install
  3. ts stop-webserver
  4. ts stop-database
  5. mkdir /mnt/oldroot
  6. sudo mount /dev/nvme1n1p1 /mnt/oldroot
  7. sudo rm -r /var/lib/mysql
  8. sudo cp -r /mnt/oldroot/var/lib/mysql /var/lib
  9. ts start-database
  10. mysql -uroot -pTempusServaFTW! -e "UPDATE applive.systempolicy SET PolicyValue='false' WHERE PolicyName LIKE 'securitySsl%'"
  11. sudo rm -r /mnt/sda/*
  12. sudo cp -r /mnt/oldroot/usr/tempusserva/sda/* /mnt/sda/
  13. sudo cp /mnt/oldroot/usr/share/tomcat8/conf/server.xml /usr/share/tomcat8/conf
  14. sudo cp /mnt/oldroot/usr/share/tomcat8/conf/Catalina/localhost/* /usr/share/tomcat8/conf/Catalina/localhost
  15. ts start-webserver
  16. Ensure server is running