Restoring a Moodle Course from Server Backup

Restoring a Moodle Course from Server Backup

by feh narz -
Number of replies: 5

Hello everyone,

we've been using Moodle  for some time, but we have a serious problem now, which we haven't had before.
Normally our teachers backup their courses manually or it is backed up automatically and the data is saved directly on our moodle-Server.
In this case nobody made a backup. Our IT-Department backs up our whole Server daily to another Backup-Server. I have success to the old "versions" of our Server but i can`t figure out how to find the Folders with the content of this course .

I know that the course data has to be somewhere on /web/xx_moodle/xx_data
I can see a lot of folders there with numbers as their name like 1,2,3,4,50,220 etc. I thought that maybe the course ID is the name of the folder, but no it isn't
I have tried to google about the structure of the Moodle-Server, but i haven't found anything useful yet...

Does anybody know how I can find the data of a course directly on the server? 

We are using Moodle Version 2.5.3

Thanks in advance,
Emanuel

Average of ratings: -
In reply to feh narz

Re: Restoring a Moodle Course from Server Backup

by Floyd Saner -

Emanuel,

If individual course backups were not made, you will not find a complete course backup in the system backups. The course information, students, forum posts, documents, etc. are distributed many places in the database and moodledata.

I would do a complete system restore from the system backup (on some other server - could be a local machine), then access and backup the specific course and restore that backup to your production system.

Floyd

In reply to feh narz

Re: Restoring a Moodle Course from Server Backup

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
The IT dept. does the backups and you restore them? That is an odd work flow. Backup and restore belong together!
In reply to Visvanath Ratnaweera

Re: Restoring a Moodle Course from Server Backup

by Donna Hrynkiw -

I think Emanuel is talking about two different kinds of backups.

> Normally our teachers backup their courses manually or it is backed up automatically and the data is saved directly on our moodle-Server.

These are Moodle backups -- a snapshot of individual courses which creates a Moodle backup archive file (mbz) for each course. Can be created/restored by teachers and/or Moodle administrators. The Automated Moodle backup process can be configured to create archive files for all the courses on a regular schedule.

> Our IT-Department backs up our whole Server daily to another Backup-Server.

These are server backups; probably some sort of snapshot or incremental backups of the whole server (operating system, software, and applications). These are usually only done by IT/Server Administrators.

In reply to feh narz

Re: Restoring a Moodle Course from Server Backup

by Donna Hrynkiw -

It's going to be extremely difficult to locate and retrieve data associated with a particular course from the moodledata directory. The folders and filenames are hashed -- moodledata is not meant to be readable by humans.

You mentioned that "...courses (are) backed up automatically..." -- hopefully you mean by the Moodle automated backup process.

If so, I'd look for a backup archive for the course created by the Moodle automated backup process instead. It will be far easier to restore the course from a backup archive file than locating its content in moodledata.

You can find the location of the backup directory in your Moodle site Automated backup settings:

Administration > Site administration > Courses > Backups > Automated backup setup > Save to ("Full path to the directory where you want to save the backup files"):

Login to the server from the command line and use the above information retrieve the backup archive file(s).

Edited to add: Nuts. I wrote the above before I noticed you also wrote "In this case nobody made a backup."
The server backups created by IT -- I don't suppose one could be restored to a running server so you could create a course backup?
Best of luck.

Hrynkiw
Kwantlen Polytechnic University




Average of ratings: Useful (1)
In reply to Donna Hrynkiw

Re: Restoring a Moodle Course from Server Backup

by feh narz -

Thank you all for your useful answers smile

I had the fear that this won't be easy... I'll now try to get my IT-Department to set it up for me on a virtual server where i run a local moodle page which is the copy of ours and then I'll backup the course and try to get it back on the real one or I'll save the important data and try to recreate it..

From now on I put every course on automatic backup, no matter how much space it takes..


Thanks again!