Forums | Mahara Community
Mahara data migration
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.
- (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?
- 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.
- 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!
04 May 2022, 8:38
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.
04 May 2022, 19:59
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!
06 May 2022, 8:12
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
- 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.
22 June 2023, 22:34
Are there instructions/guidance anywhere for site migration?
28 June 2023, 8:23
It depends on what type of migration you want to do:
- Migrate servers: That's a typical sysadmin task and not Mahara specific.
- 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.
- 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.
- 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).