Attention : vous consultez actuellement la documentation dédiée aux versions 2.x de Moodle. La documentation pour les versions 3.x de Moodle est consultable ici : Restauration de site et celle pour Moodle 4.x est consultable là : Restauration de site.

Restauration de site

De MoodleDocs
Révision datée du 31 décembre 2013 à 10:57 par Nicolas Martignoni (discussion | contributions) (Nouvelle page)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à :navigation, rechercher

Remarque : cet article est en cours de rédaction. N'hésitez pas à le compléter. Veuillez utiliser la page de discussion ou un forum adéquat de Moodle en français pour vos recommandations et suggestions d'améliorations.

If you have followed the Site backup instructions and created a backup of a Moodle site, you may need to know how to restore the site backup you created.

There are 3 areas that could be restored individually or together:

  • Moodle code
  • Moodle uploaded or created files
  • Moodle database - MySQL, Progres or other

The location and names of these areas can be found in the Configuration file.

Restauration en ligne de commande (Linux, Mac OS X)

Here is a set of basic steps that make up the restore process.

1. Rename the original Moodle directory to something different (so you still have it) and copy the backed up Moodle directory or a newly downloaded Moodle directory in its place.

2. If you are running MySQL, a backup of the database should be a .sql, .gz or .tar.gz file. If it is .tar.gz or .gz you need to extract it until it is an sql file.

tar -xzvf moodlesqlfile.tar.gz

3. If you are running mysql, import the SQL file back into a newly created database on the MySQL server. Be careful here, some backups try to import right back into the same working database that Moodle is connected to. This causes database problems that damage a Moodle installation. The best thing to do is make a new database, restore the backed up database into it, and change the Moodle config.php file to connect to this new database (this way you still have the original database).

Once you have created the new database:

mysql -p new_database < moodlesqlfile.sql

For other databases, follow their instructions for restoring a backup.

Outils pour la sauvegarde et la restauration de sites

  • phpMyAdmin
  • MySQLdump

Restauration avec phpMyAdmin

Restoring a backup of a MySql database

  1. Open the database to restore
  2. Click the SQL tab.
  3. On the "SQL"-page , unclick the show query here again.
  4. Browse to your backup of the database.
  5. Click Go.

Voir aussi