forked from openedx-unsupported/configuration
-
Notifications
You must be signed in to change notification settings - Fork 13
Migrating edX containers from one server to another
Filip Jukić edited this page Jan 15, 2015
·
5 revisions
- SSH into your old docker server:
ssh root@<old_server_ip>
- Download the backup script:
curl -O https://raw.githubusercontent.com/appsembler/configuration/docker_release/backup_scripts/backup_edx.sh && chmod +x backup_edx.sh
- Download the SSH key for SSHing into the container:
curl -o insecure_key -fSL https://github.com/phusion/baseimage-docker/raw/master/image/insecure_key && chmod 600 insecure_key
- Run the backup script with the container ID or name as a parameter:
backup_edx.sh <container_id>
- Temporarily add the insecure public key to your authorized_keys SSH file:
curl https://raw.githubusercontent.com/phusion/baseimage-docker/master/image/insecure_key.pub >> .ssh/authorized_keys
- Launch a new instance of edX on Appsembler Launcher
- SSH into your new docker server:
ssh root@<new_server_ip>
- Download the SSH key:
curl -o insecure_key -fSL https://github.com/phusion/baseimage-docker/raw/master/image/insecure_key && chmod 600 insecure_key
- Transfer the backups:
scp -i insecure_key root@<old_server_ip>:edx_\* .
- Download the restore script:
curl -O https://raw.githubusercontent.com/appsembler/configuration/docker_release/backup_scripts/restore_edx.sh && chmod +x restore_edx.sh
- Run the restore script with the container name (it's in the deployed app URL) as a parameter:
restore_edx.sh <container_name>
(container name: openedxliteXXXXXX) - (optional) If course assets are missing, after all the above, export the courses in the CMS of the old site and import them in the CMS of the new site.
- Delete the insecure key from the old server
ssh root@<old_server_ip>
,vim .ssh/authorized_keys
- Find the new deployment in the Launcher admin and copy the field "Remote container ID"
- Find the old deployment in the Launcher admin and paste that value in the field "Remote container ID"
- Use the (yet nonexistent) refresh routes option for the old container
- Delete the new deployment