Forums | Mahara Community
Support
/
Importing from one server to another
11 October 2013, 8:07
If I want to import from one server from another (e.g. from live to test), do I need to run any changes to the database (like Moodle does with admin/tool/replace) to get it to pick up the new server name?Does anyone have a script already if needed?
11 October 2013, 12:58
Hi Wullie,
Here's what you need to do: https://wiki.mahara.org/index.php/Developer_Area/Changing_Hostnames
Mahara doesn't currently have an inline link replacement tool like Moodle's admin/tool/replace, though. So, hard-coded absolute links that people have placed in text areas won't be translated to the new site URL. This has usually not been a major obstacle for us at Catalyst in our test sites, though. (We copy production databases to test sites pretty frequently.)
In theory, it would be possible for someone to write something like Moodle's admin/tool/replace for Mahara, though. All the Moodle tool does is scan the database to find every "text" or "varchar" column in every table, and then it does a SQL "replace" on them to replace the old URL with the new one (I believe it has a hard-coded list of tables and columns to ignore, such as mdl_config). The same principle should apply to Mahara.
Cheers,
Aaron