Merging two instances and user data

Merging two instances and user data

Tracy Kriesel
Vastuste arv 5

Hi,

I currently have two Moodle instances that i am wanting to combine. To transfer the courses over is a relatively simple process, however my problem arises with users. I have some users who are registered users on both sites, most with the same user name, often with different passwords though. If i merge two sites with user data, what will happen with the conflicting user information? Will one be deleted because of conflicting information or will i be able to merge them in some way?

Keskmine hinnang: -
Vastuses Tracy Kriesel

Re: Merging two instances and user data

Guillermo Madero

Hi Tracy,

What Moodle version are you using? Are all the courses in one installation different from the other installation?

You should start by making sure that for each user, both its username and registered email address are the same in both installations. So, if a particular user is registered in both sites but the registered email address is different in each case, Moodle will take it to be a different user.

Vastuses Guillermo Madero

Re: Merging two instances and user data

Tracy Kriesel

Hi,

We are currently on 2.4, but looking to upgrade to 2.5 when we have one instance.

Ensuring the username and email address is the same will be a bit of work, but if that's the only way we can create the users correctly that will have to do.

Thanks for your help.

Tracy

Vastuses Tracy Kriesel

Re: Merging two instances and user data

Rex Lorenzo

We use this plugin successfully to merge in user accounts on our system:

https://moodle.org/plugins/view.php?plugin=report_mergeusers

But if doing a backup/restore, here is the logic of how it is handled:

http://docs.moodle.org/26/en/Backup_and_restore_FAQ#Restore_stops_with_the_message_.22Trying_to_restore_user_xxxx_from_backup_file_will_cause_conflict.22

Vastuses Rex Lorenzo

Re: Merging two instances and user data

Tracy Kriesel

Thank you, the how to is valuable.

Tracy

Vastuses Tracy Kriesel

Re: Merging two instances and user data

François Lizotte
Particularly helpful Moodlers pilt

Hello,

I know this is late, but we are in the process of merging two Moodle sites using course backup and restore trick.

Both Moodle sites are version 2.6.

Since a few courses are currently in use, we have to save and restore with users data.

Now let's say userX il is enroled in courses A and B. When we transfer course A from Moodle 1 to Moodle 2, userX gets created on Moodle 2 and everything is fine. However, when doing the same thing with course B, then we have a conflict with the userid.

There is no mention of userid in this doc page (https://docs.moodle.org/26/en/Backup_and_restore_FAQ#Restore_stops_with_the_message_.22Trying_to_restore_user_xxxx_from_backup_file_will_cause_conflict.22).

To make it work, we have to run a find/replace script to match userids in the backup file with userid on Moodle B.


François