Forums | Mahara Community

Support /
Mahara data migration

Tobias Nusser's profile picture
Posts: 5

03 May 2022, 20:41

We are trying to migrate our externally hosted mahara instance and its data to our own mahara server instance. As for migration of the data, in my understanding there are two viable options. 

  1. (Bulk)-export user portfolios on the old instance and (bulk)-import them on our own. Additionally export and import groups via csv-file and export archived submissions. Does this cover the majority of the data? Does the bulkexport and bulkimport work reliably? Do we have to manually upload/link binary files (images,PDFs etc) again as it seems the bulkimport uses only the the leap2a.xml file. And if it fails for one person, does the whole process fail (and revert all changes done so far?) or does it just continue with the next person?
  2. Use the sitedata and database from the old instance and copy/merge them with our new instance. As we are using postgres and the externally hosted instance uses MariaDB a DB merge wouldn't be trivial.
  3. Just copy code, db and sitedata to new server --> Our instance is already configured with SSO (and more) and our internal guidelines forbid to just copy code from external entities to our own servers.

Do you have any suggestions on how to approach a data migration in-between mahara instances. (Both instances run the same version - currently 21.10.0 or in near future potentially 22.04.0

Thank you for your help!

Kristina Hoeppner's profile picture
Posts: 4706

04 May 2022, 8:38

Hi Tobias,

It is definitely possible to move from one database type to another. We have done that as part of migrating one Mahara site into another and thus at the same time also changed from MySQL to PostgreSQL with a number of custom scripts. Get in touch if you want to know more about that.

Thank you


Tobias Nusser's profile picture
Posts: 5

04 May 2022, 19:59

Hi Kristina,

so in your opinion, a database and sitedata migration is preferred compared to the bulkexport/ import functionality? I would love to know more about the db scripts and sitedata migration.
Thank you in advance!


Kristina Hoeppner's profile picture
Posts: 4706

06 May 2022, 8:12

Hi Tobias,

Yes, definitely. A site migration would be better because the portfolio export only does so much. If you migrate your site, you will keep:

  • Personal portfolio
  • Personal settings
  • Friend relationships
  • Authentication methods
  • Skins
  • Notifications
  • Institution and site portfolios
  • Institution and site settings
  • Groups, their members, forum entries, group configuration
  • Group portfolios

If you migrate and keep the same URL, you will also retain all sharing permissions.



MarionMacDonald's profile picture
Posts: 198

22 June 2023, 22:34


Are there instructions/guidance anywhere for site migration?

Regards, Marion

Kristina Hoeppner's profile picture
Posts: 4706

28 June 2023, 8:23

Hi Marion,

It depends on what type of migration you want to do:

  1. Migrate servers: That's a typical sysadmin task and not Mahara specific.
  2. Use of a new domain: That requires config changes and also updating of internal reference links, in particular in text blocks and notes where images might be referenced. That can be taken care of with the built-in update tool or embedded URLs. You may also need to update keys for SSO.
  3. Database migration from MySQL to PostgreSQL (we don't recommend moving from PostgreSQL to MySQL): That takes quite a bit of effort and while there are generic tools that can do that, it's not always immediately successful. That's where we have used custom scripts in the past that allow us to perform that work. These scripts are not publicly accessible, but we can price a project for you.
  4. Merge one Mahara instance into another: That's achieved via a series of custom scripts that can also be used for a database migration (see above).



6 results