WeBWorK Main Forum

Exporting and Importing Courses

Exporting and Importing Courses

by Walter Schwarz -
Number of replies: 2
We are migrating from one webwork server to another, both on version 2.12.

I believe I want to do the following:
oldserver$ wwdb coursename export coursename.xml
newserver$ wwdb coursename import coursename.xml

The export seems to work, but on the import I get the following errors for the two courses I am trying:

First,
* problem_user record with user_id='username@domain.edu' set_id'T5' problem_id='11': [missing table]
(This message is repeated many times for different users with different T7,T8,T9 numbers and different problem id numbers)

Second,
* Failed to parse XML document:
not well-informed (invalid token) at line 85009, column 0, byte 2323200 at /usr/lib/x_86_64-linux-gnu/perl5/5.22/XML/Parser.pm line 187.

Any advice on how to proceed?
In reply to Walter Schwarz

Re: Exporting and Importing Courses

by Michael Gage -
A common way to do these transfers is to

1. from admin page archive all of the courses you want to keep.
2. using command line tools transfer the resulting .tar.gz files to the new server. (sftp is one possibility)
3. in the admin course on the new server unarchive the files you have transferred.


This transfers all of the mysql data for each course AND transfers the directories for each course (and their contents).

Is there a reason not to do it this way? You might try it for one course and see if it is easier.
In reply to Walter Schwarz

Re: Exporting and Importing Courses

by Danny Glin -
If you are copying the entire contents of the server, then it is simpler to just copy the whole database using mysqldump, and copy the courses directory.

This will overwrite things on the new server, so it's only useful if you want an exact copy of the content on your old server.