[Moodle] How do I back up my moodle?
Laurie Savage
sav at pvgc.vic.edu.au
Fri Jan 25 15:40:32 EST 2008
Suzanne,
I would suggest that you open the config.php file in the root of
your old moodle installation and note down the location of your
data directory, name, username and password of your database.
Backup everything - new and old installations! (I normally copy the folders to a backup
folder or onto a CD)
Copy the original config.php into the root of the new
installation.
Copy the moodle data folder to the new server making sure it has
the same path.
Use whatever techniques you use to backup your original database
and restore it to the new server.
(From memory, in Linux/MySQL Land, you would issue these commands at a terminal,
-p prompts for the mysql password:
1. Dump the database into a plain text sql file.
oldmachine> mysqldump -u <user> -p <database_name> > backup_file.sql
2. Create a new Moodle database on the new machine and grant the
user named in config.php all rights to the database
newmachine> mysql -u root -p
mysql# create database <name>;
mysql# grant all on <name>.* to <user>@localhost identified by <password>;
mysql# quit
3. Populate the database by running the SQL file on the newly
created database.
newmachine> mysql -u root -p <database> < /path_to/backup_file.sql
-- don't forget the less than sign "<" that pipes the sql
file to the database.
)
Cheers,
Laurie
--
Laurie Savage
====================================================================
Markbook/Moodle Coordinator::Pascoe Vale Girls College::03 9306 2544
You never hesitate to tackle the most difficult problems.
More information about the moodle
mailing list