Simple advice

Simple advice

Jay G. -
Atsakymų skaičius: 1
Hi, I've been chipping away at getting our moodle version upgraded. I shan't go into the comedy of errors it turned out to be :/ but I think I am at the last hurdle.

I backed up before we moved over. We did MySQL from v4.x to v5 at the same time, and now I think I just need to restore backup. But this is proving less than intuative... I don't actually know where to start! the FAQ covers backups but not restoring as far as I can see....
Įvertinimų vidurkis: -
Atsakymas į Jay G.

Re: Simple advice

Iñaki Arenaza -
Core developers paveikslėlis Documentation writers paveikslėlis Particularly helpful Moodlers paveikslėlis Peer reviewers paveikslėlis Plugin developers paveikslėlis
If you did a database backup (with mysqldump or similar tools), doing a restore is quite simple. You just feed the file into mysql command, and it restores the contents directly (a mysql backup is just a series of commands to create the tables and insert the values, in plain SQL syntax).

Say you have your backup in a file called moodle.dump, that your moodle database is called 'moodledb', that you use a username 'moodleuser' with password 'moodlepass' to connect to that database, you just need to drop all of the existing tables (or the restore will add to the existing contents), and then execute:

    mysql -u moodleuser -p moodledb < moodle.dump

and then type the 'moodlepass' password when you are prompted to.

Saludos. Iñaki.