Can I backup a course category ?

Can I backup a course category ?

by Karrie V -
Number of replies: 3

Can I back up a category of courses and restore them all at once?   I am running 1.4.1+ currently and I am having some problems with the current install logs dont work and so on.  When I move to 1.5 I want to move the current courses but I would like to start from scratch we bought a server strictly for Moodle.  I am trying to find an easier way other than backing up 30 something classes individually and restoring each one. 

 

Thanks in advance!

Average of ratings: -
In reply to Karrie V

Re: Can I backup a course category ?

by Thomas Haynes -
Karrie...

What you want to do is move the entire data directory to the new server, and then move the moodle directory.

Backup the database and then restore it on the new server.

Check your config.php to make sure you have made changes to reflect the location of the new data directory, etc. if you changed paths.

You should be up and running on the new server.

I did this over Spring Break as we moved from a whitebox workstation that was seriously underpowered to a real server w/ 4 gig of RAM. It all worked perfectly.

We were on linux machines, but the process would be similar (with different details) on Windows.

Regards...   Tom
In reply to Thomas Haynes

Re: Can I backup a course category ?

by Karrie V -

Thanks Tom,

 I was wondering if you can you explain how I do this?

smile Karrie

In reply to Karrie V

Re: Can I backup a course category ?

by Timothy Takemoto -

Dear Karrie V.

I have had the same problem and to be honest, I do not know the solution because...

If you have your hands on the server then you can use mysql directly. If you do not then use the moodle database administration add in (based on php mysqladmin) module that can be downloaded from the downloads page. I recommend that you install the database admin module anyway.

Then you have to "dump the database" (extract the database into a file) and then upload that file into a your new database manager in your new moodle installlation on your moodle server. When "dumping" the database it seems to be advisable, or even necessary, to select *something like* "make dump table" or... I am not sure. There is a check box that one has to check when dumping. I think that it saves not only the database, but information on how to rebuild the database on another installation. I can find out for your if you need to know.

Problem is that the import of the database often runs out of time, with a large database. And if you have thirty courses then your database is large. If you search the internet you will find that there are loads of people with the same problem. They "dump" the database on one installation, and create a very large file (several MB). Then when they go to import the database into their new installation it takes so long that the server says "timeout!"

I am not sure where all the settings are to ensure that it does not run out of time when trying to import the massive dumped-database file into the new server.

What some people do is to chop the database into blocks. If you do not use moodle during the process then it is okay, I think, to chop just about anywhere (at the end of a line).

Hmm... Perhaps I am making you more confused. 

It would not take more than 2 hours to back up and restore your 30 courses. That might be the best idea. 

Timothy