Restore Individual Course from Nightly Backup - Appsembler

Restore Individual Course from Nightly Backup

Overview

Extracting a single course from a nightly backup is a bit of a pain. You need to physically download the mongo tarfile from S3 or GCloud Storage, load it into Mongo, navigate to the course in Studio, then export the course as a tarfile.

You can load the Mongo backup database into either Devstack, or you can spin up a generic Open edX server and use that. These directions will work for either

More Detail 

1. Spin up your server (Devstack or any other deployment)

2. Download the tar.gz file to your server. Visit the GCloud console and click: Storage -> Cloud Storage -> Browser. From there, find the file you want to download and click the checkbox in the “Share publicly” column. After you check the box, a download link show appear. Coppy that link and from your server’s console, run:

wget https://storage.googleapis.com/bodymind/……tar.gz

3. Extract the tar.gz file

tar zxvf *.tar.gz

4. Recreate the Mongo db from this backup

mongorestore extractedDbName

5. After this operation has completed, visit Studio and navigate to the desired course. From the top menu, click Tools->Export, then click the blue “Export course content” button. 

6. Upload the extracted .tar.gz file to the production server.