Migrate users after an upgrade

Daniel Main asked on July 24, 2019 17:46

We are finalizing a major upgrade V9+ to V12+, this was mostly done by a 3rd party company.

One issue is that we still had the V9 running so more users had set up accounts, performed various activities, etc....

Is there a process that we can use to migrate that data over to the new V12?

Recent Answers


Brenden Kehren answered on July 24, 2019 18:54

There are a few things you can do, I'd suggest this:

  • Generate a query of the users created after a date you specify.
  • Import those users into your new v12 instance using the Kentico Import Toolkit (KIT). Be sure to save a reference of the new keys and the user info in a FKMap file (it's part of the import you can request).
  • Regarding the activities, you'd need to also get a list of contacts based on those user accounts and import activities for those user accounts. This may be a bit more of a challenge as I don't believe the KIT will allow you do import a contact's activity.

I'm hoping others can chime in as well but this should get you started.

0 votesVote for this answer Mark as a Correct answer

Mike Wills answered on July 24, 2019 18:57

Hi Daniel,

I successfully migrated users from V8 to V11 in this scenarios -- specifically users that were added after starting the upgrade process.

After the upgrade process there were about 30 new users that were added during the transition window. We were able to use Kentico's Export/Import capabilities to transfer the users, one user at a time. We exported each user from the Users module, and then imported them in the Sites module. We were very careful to make sure only the user object was imported.

To my surprise, this worked. Even the passwords were still intact. We only had trouble with a small number of users, because their passwords did not satisfy the upgraded password rules. For those users, we provided instructions for them to reset their password.

This might work for you too. I'd test it carefully, before trusting it.

Mike

0 votesVote for this answer Mark as a Correct answer

Daniel Main answered on July 24, 2019 19:00

I think that may provide the best methods, I can give it a shot on our staging environment before the go live.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 24, 2019 21:58

Daniel,

What Mike provided could possibly work but it's not recommended to export content from an old version and import it into a newer version due to data consistency.

Also, if this works, it will only import the users and the users settings. So it still doesn't get you to import your contacts and activity. I still stand with the KIM to perform your import of those users and settings.

This SQL statement should get you the users you want, just change the date.

select *
from cms_user   
    left outer join CMS_UserSettings on userid = UserSettingsUserID
where UserCreated > '7/1/2019'
0 votesVote for this answer Mark as a Correct answer

Mike Wills answered on July 24, 2019 22:49

+1 for Brenden's solution Daniel. It looks safer, especially because one couldn't accidentally import more than what's wanted -- something that's easy to do with the export/import method. And, it looks like you can include the password hash too.

Image Text

0 votesVote for this answer Mark as a Correct answer

Daniel Main answered on July 24, 2019 23:26

Well, I will be testing this on our Stage environment tomarrow, so will let you know what I find.

0 votesVote for this answer Mark as a Correct answer

Daniel Main answered on July 26, 2019 23:04

Well, my testing went through and looks like it will mostly work.

With the exception of the CMS_UserRole and the CMS_UserSite tables. But I have a plan.

1) make sure the auto increment UserId is refreshed after removing any junk test users. 2) import the users via the import tool so that they have the same UserId (I noticed a lot of the tables use this and the UserGUID) 3) find the records in all the user content tables that was created after the date and just import it. Since the UserID's will match there should not be any issue, just time.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 26, 2019 23:59

Right. The import it imports the users and the settings, no child objects. Those would have to be done in another import through the KIM if it allows or through a simple SQL statement.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.