...
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/myaegee NEW$ make start NEW$ docker rm $(docker stop $(docker ps -aq)) |
Backup: pictures (with basically a restore because we start the setup first)
Code Block |
---|
OLD$ scp -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$ scp -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$ scp -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$ scp /opt/myaegee/.env prod:/opt/myaegee/.env |
Backup: databases
Code Block |
---|
OLD$ cd /opt/myaegee OLD$ make backup OLD$ scp -R IDK prod:IDK |
Restore: databases
Code Block |
---|
NEW$ cd /opt/myaegee 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 |