WeBWorK Main Forum

How to recover a deleted course from backup?

How to recover a deleted course from backup?

by Tim Alderson -
Number of replies: 2
We have a course that was accidentally deleted. The system was backed up (database as well as folders), but I am unsure which files to replace.

Can a single course be recovered  without "recovering" the other courses?  If so, a how-to would be greatly appreciated.
 
In reply to Tim Alderson

Re: How to recover a deleted course from backup?

by Danny Glin -
I believe all you need is the course directory, and any database tables that start with this course name.

If the course was properly deleted, there should be no directory called '/opt/webwork/courses/[coursename]' (assuming you used the default installation path), so copy this directory from your backup.  Depending on which user you use to copy the files, you may need to fix the permissions.  Easiest way to do this is to follow the instructions in the installation documentation.

For the database tables, it depends how your database was backed up.  If you run the following command in mysql on the backup database, it will tell you which tables should be copied:
mysql> show tables like '[coursename]_%';

If you tell me what form your backup is in, I can probably provide more detailed instructions.

Danny
In reply to Danny Glin

Re: How to recover a deleted course from backup?

by Tim Alderson -
Thank you for your help. I am not sure what form the backup is in. I can't get back into it until Monday, but will try what you suggest at that point. Thanks again.