Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • static maintenance page

  • Attention!!

    • people will be applying for SUs

    • and online question statutory

    • AND AEGEE.org/vote

  • Time:

    • (stop the system), start maintenance page 5'

    • backups 10' to say the most

    • file transfer time (should be fast because internal network)

    • restoring backups 10'

    • validation (HOW?)

      • read logs like crazy

      • sampling images

      • normal login and check around

    • startup docker on new

    • run the ansible on old → becomes “reassign IP from azure cloud”

things to not forget:

  •  run it once to create folder files etc

...

  •  .env file as part of the backup

...

  •  certificates: we can decide to migrate them (just in case) but it should be simpler to make traefik regenerate them

Commands

Setup: ready the maintenance page

  •  
Code Block
done already

Setup: make prod an alias to new prod

  •  
Code Block
OLD$ vim ~/.ssh/config
add prod with IP 51.144.111.184

Setup: startup the thing once

  •  
Code Block
#NOTE: doesnt matter the .env
NEW$ cd /opt/myaegeeMyAEGEE
NEW$ make start
NEW$ docker rm $(docker stop $(docker ps -aq))

Setup: trying the backups of the nightly on the new one

  •  
Code Block
skipped

Migration: stop on OLD

  •  
Code Block

Backup: pictures (with basically a restore because we

...

started the setup first)

  •  
Code Block
OLD$ sudo scp -Ri /home/grasshopper/.ssh/id_rsa -r /var/lib/docker/volumes/myaegee_events-media/ prod:/home/grasshopper/myaegee_events-media
NEW$ sudo cp -R /home/grasshopper/myaegee_events-media/ /var/lib/docker/volumes/myaegee_events-media/

OLD$ sudo scp -Ri /home/grasshopper/.ssh/id_rsa -r /var/lib/docker/volumes/myaegee_statutory-media/ prod:/home/grasshopper/myaegee_statutory-media
NEW$ sudo cp -R /home/grasshopper/myaegee_statutory-media/ /var/lib/docker/volumes/myaegee_statutory-media/

OLD$ sudo scp -Ri /home/grasshopper/.ssh/id_rsa -r /var/lib/docker/volumes/myaegee_summeruniversity-media/ prod:/home/grasshopper/myaegee_summeruniversity-media
NEW$ sudo cp -R /home/grasshopper/myaegee_summeruniversity-media/ /var/lib/docker/volumes/myaegee_summeruniversity-media/

Backup: things

  •  
Code Block
OLD$LOCAL$ scp my.aegee.eu:/opt/myaegeeMyAEGEE/.env prod:/opt/myaegeeMyAEGEE/.env

Backup: databases

  •  
Code Block
OLD$ cd /opt/myaegeeMyAEGEE
OLD$ make backup
OLD$ scp -R IDKr /opt/backups/backup-2024-04-27_1033.tgz prod:IDK/opt/backups/

Restore: databases

  •  
Code Block
NEW$ cd /opt/myaegeeMyAEGEE
NEW$ vim scripts-server/restore.sh # To edit the DB names
NEW$ #make sure the folders are in the proper place
NEW$ ./scripts-server/restore.sh

Bring it back up: reassign IP in azure

  •  
Code Block