Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Moodle migration.
Method 1 and Method 2 are exactly the same, no? M2 just replaces M1's 'copy the files' with 'use rsync'. These should be combined and improved probably with "here are some options for copying the data...." --Howard Miller 14:10, 8 May 2009 (UTC)
Does anyone know why there is no mention of changing dirroot on this page? --Richard Enison 18:02, 26 December 2007 (CST)
The difficulty in migrating Moodle from one URL to another is to get the database right. But it might be a pitfall when you do not check your dirroot, datafolder etc too. Please feel free to add anything you feel appropriate to this page - it's a wiki :-) --koen roggemans 06:20, 27 December 2007 (CST)
sed line incorrect
I'm completely new here so I don't want to just start coming in and making changes but the sed command for swapping the url in the mysqldump output is incorrect.
Currently it reads:
#sed -e 's/oldserver.com/newserver.com/' oldmysqldump.sql > newmysqldump.sql
This will work but it will only substitute the first instance of newserver.com on each line. It's possible for the mysqldump to leave several instances on a line so you could get an invalid database.
The correct version would be:
#sed -e 's/oldserver.com/newserver.com/g' oldmysqldump.sql > newmysqldump.sql
Note that the -e is not actually necessary with only a single substitution, but it doesn't cause any harm so I've left this unaltered.
Should I go ahead and make my first contribution to the Moodle wiki? :)
So, say for example a course has HTML resources that link to images stored on the Moodle site. in the course's moodledata files. Is there an existing way to change all of the HTML resources from the old URL to the new one?
I could (and will, actually - I'll post it here when I'm done) write a short perl script for this but if something already exists that would be super.
Don't forget the cron job
Maybe it's obvious, but I nearly forgot it, so I mention it.