Upload App Data

If you want to upload course or datastore data that you previously downloaded, use the ETL command. If you backed up datastore data using the Developers Console, you can restore from the same console. You should not upload data if you have modified the files in any way.

Note: Don’t upload any data to a course that is currently running. There may be collisions or other dynamics that could have unforeseen negative consequences.

Restore from the Developers Console

If you backed up your datastore data using the Developers Console, you can restore from that same location.

  1. Go to the Developers Console.
  2. Select a backup in the Backups section.
  3. Click Restore.
  4. Click Restore on the confirmation page.

Upload course data

From your Course Builder root directory, use the etl.sh script, which calls the etl.py command. You upload course data one course at a time.

sh scripts/etl.sh upload course <course_url_prefix> <app_server_name> --archive_path <archive_path>

Use this command from the root of your Course Builder installation. Here is an example of the command to upload course data:

cd /Users/sammich/coursebuilder
sh scripts/etl.sh upload course /physics zabaione.appspot.com --archive_path ./physics-course.zip

The first line makes the current directory the Course Builder root directory (in this example, /Users/sammich/coursebuilder). The second line finds the file named physics.zip in the current directory (the same file you downloaded earlier) and uploads it to Google App Engine.

You may want to review the ETL functionality.

Upload datastore information

The following command uploads datastore data:

sh scripts/etl.sh upload datastore <course_url_prefix> <app_server_name> --archive_path <archive_path> --datastore_types <model1,model2>

Use this command from the root of your Course Builder installation. In the following example, the Course Builder installation is at /Users/sammich/coursebuilder and the command downloads student information:

cd /Users/sammich/coursebuilder
sh scripts/etl.sh upload datastore /poetry bbq.appspot.com --archive_path ./poetry-datastore.zip --datastore_types Student

When the upload command has run, visit your site to confirm that your site now has all its datastore data restored.