Do you use automatic scripts to dump the database contents and backup the moodle data folder?
I'm using this one. Its not perfect but it hasn't let me down yet...
:: This is for date style 03.09.2003
:: Create date without periods
FOR /F "TOKENS=1,2*" %%A IN ('DATE/T') DO SET TODAY=%%B
:: Empty unnessessary environment variables
:: Set directories
:: Stop webservice
NET STOP w3svc
:: Dump the database
mysqldump --user=username --password=password --opt moodle > %BACKUPDIR%\db_moodle.sql
:: Backup moodledata
wzzip -rp %BACKUPDIR%\moodle_%CURRENTDATE%_bak.zip %MOODLEDIR%\*.*
:: Start start webservice
NET START W3SVC
:: Zip the dumpfile you'll need the commandline support add-on
wzzip %BACKUPDIR%\sql_%CURRENTDATE%_bak.zip %BACKUPDIR%\*.sql
:: Delete dump_file
:: Unset directory Environment variables
:: Shut command prompt
- Janne Mikkonen -
If you want to make it much simpler, just use phpMyAdmin. When you select any database there, there is an "Export" option. To import, you have an option to import the SQL text file at "SQL". Just a problem there: PHP use to have limited uploads up to 2MB. Of course, you can change it in your php.ini.
To run scripts, just use MS-DOS commands in a .bat file. That simple. They are not as powerful as Unix scripts, but they work.
Hope this helps.
I installed Moodle on two Mac OS 10.3.4 systems. One, my test system is my laptop and the other is actually being worked on to see if it can be used for our purposes as a school district.
Here comes the fun part. After getting the cron to perform several backups, I naturally wanted to test to see if I could restore from them.
When I used the wonderful mysqldump command mentioned elsewhere, it worked great. What I did not find was any mention of how to then restore from this dump file. So, I naturally assumed that I could just replace my existing moodle SQL DB with the dumped one. When I found the moodle DB it wasn't a single DB. It was dozens of files in a folder with the name moodle.
How does a person go about taking a single mysqldump file and restore it? I haven't found any helpful commands listed anywhere and I was really hoping that someone could point me in the proper direction.
My assumption is that once I correctly restore the mysqldump'ed DB that my moodle site will appear on my test system.
I greatly appreciate any assistance that can be give,