Complete instructions, Backup & Recovery

Complete instructions, Backup & Recovery

by Dani Stern -
Number of replies: 2

I couldn't find this information anywhere else so I thought it might be a good resource for others. It's a complete instruction of how to make a backup of your whole moodle-setup and then recover it.

This method is tested on a moodleistallation running mysql.

Backup process:

1. In phpMyAdmin select the database you wish to backup and then go to Export menu.

2. Select "Structure and Data" and check all the rest of the checkboxes (optional: gzipped and zipped, I recommend leaving these unchecked)

3. Press "Go" and choose a destination for the backup-file.

4. Make a copy of the directory where all uploaded documents/files are saved.

5. Make a copy the dirroot directory. (The directory with all the web files, PHP files...)

Recovery:

1. Create a new empty database.

2. Install a new installation of moodle using the new database.

3. In phpMyAdmin, choose the new database, go to menu: SQL

4. In the field "location of the textfile" choose the destination to the backupfile (the one you exported)

5. Press go smile

6. Make sure that the settings in config.php is correct.

Voilà!

Please comment if there's something I've forgot.

Average of ratings: Useful (1)
In reply to Dani Stern

Re: Complete instructions, Backup & Recovery

by Sean Keogh -
When you are copying the moodledata directory, where uploaded files and so on are saved, you must record which permissions are in force, and reapply them when you recover, otherwise having copied it back, (presumably after reinstalling the moodle system), moodle won't be able to write to it.

That is my understanding anyway, I believe there have been one or two problems relating to this moodledata permissions issue in the past.