Backup and restore

 
 
Picture of Andrew Leer
Restoring a Site Backup in Moodle 2.5 yeilds no active classes?
 

I recently did a site backup on our Moodle 2.5 installation using the following command for the database portion:

mysqldump -u username --password=password -C -Q -e --create-options moodle > moodle-database-backup-07-27-2013.sql

I tried restoring just the SQL database back to a test server, by running the sql backup script on the database to test the backup to make sure it worked.  However, only the course categories that are not shown (the little closed eyeball icon), are being backed up.  I have two course categories that are not being displayed at all that are on the live site, but are not being displayed in the backup when restored on the test server. 

These are actually more important since these are the courses our students are enrolled in, and thus what I wanted to backup in the first place. 

Note that I only restored the .sql backup file and not the entire site directory from the site backup (I have a hunch this might be the issue, but I'm not completely certain of this).

I looked in the .sql file and the missing courses are indeed mentioned, I found one of the missing course id's listed in the file, but when I run the site it does not appear.


Where did these categories disappear to, considering that a mysqldump should copy the entire content of the site?

 
Average of ratings: -
St Petersburg, Russia
Re: Restoring a Site Backup in Moodle 2.5 yeilds no active classes?
Group Particularly helpful Moodlers

Presumably you're using the same code base with the restored database? Have you checked the actual database with phpmyadmin after the restore? Searching the mdl_course table for the 'missing' courses will show whether they are present or not. There is something squirrley going on -- I restore from mysql database dumps as a matter of course and have never had the problem you describe.

 
Average of ratings: -