Moving a course from one server to another

Re: Moving a course from one server to another

by Herbert Keijers -
Number of replies: 0
This looks to me like a good idee, changing the absolute URL in moodle.xlm
I've done the following in trying to move from www.server1.com to www.server2.com :
  1. Export the whole moodle database content on server1 into a *.sql file. You can do that for example with phpmyadmin version of moodle.
  2. On server2 , clean dir moodledata and drop all tables of moodle , if any.
  3. Import the content of moodle database from the *.sql file. You get a copy of your moodle like it was on www.server1.com with no course files.
  4. Start backing up and restoring the courses under the same name from server1 to server2 and replace their content. You do this by changing the absolute URL in moodle.xls to the one of your new server as Zbigniew Fiedorowicz suggested.
  5. Everything seems to be in the right place, except ... yes the users !!! Because the moodle database already knew the users no one is created in  pathto/moodledata/users ...
  6. Then I backuped one course which contains all the users, unzipped it and scp their directories to pathto/moodledata/users . Changed the permissions.
Seems to work ... ??? or ...
The reason why I didn't tar the whole moodledata directory is because from the place I'm sitting now I don't have shell access to server1 (firewall thing) and the school (and I) are on holliday.
I'm looking forward to the backup/restore in the final release of moodle1.2
Have a nice Christmas.