# Users source migration

**URL:** <https://forum.inductiveautomation.com/t/users-source-migration/19166>\
**Category:** Ignition\
**Created:** [August 9, 2018, 7:05am UTC](https://forum.inductiveautomation.com/t/users-source-migration/19166 "2018-08-09T07:05:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.lebohec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/r.lebohec/32/3704_2.png) [@r.lebohec](https://forum.inductiveautomation.com/u/r.lebohec)\
**Post date:** [August 9, 2018, 7:05am UTC](https://forum.inductiveautomation.com/t/users-source-migration/19166/1 "2018-08-09T07:05:47Z")

</div>

Hi @Colby.Clegg  
is it a way to migrate an existing ‘Internal User Source’ with more than 50 users profiles to a new ‘Database User Source’?  
My orignal issue is that, i’ll like to restore backup on a production gateway and i don’t want to erase all users changes.

Regards,

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 9, 2018, 3:20pm UTC](https://forum.inductiveautomation.com/t/users-source-migration/19166/2 "2018-08-09T15:20:33Z")

</div>

You can copy the `config.idb` file out of the installation directory, then open it with [`sqlite`](https://www.sqlite.org/download.html); then copy the values out of the `INTERNAL*` tables and put them into the appropriate tables in your database user source:  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6b9a1ccb3ff177d7101643d3257a1fcc87948e66.png)

---

<div class="post-metadata">

**Author:** ![r.lebohec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/r.lebohec/32/3704_2.png) [@r.lebohec](https://forum.inductiveautomation.com/u/r.lebohec)\
**Post date:** [August 9, 2018, 3:55pm UTC](https://forum.inductiveautomation.com/t/users-source-migration/19166/3 "2018-08-09T15:55:38Z")

</div>

Thanks @paul-griffith,

It seems that the password encryption isn’t the same between an SQLITE Internal database and a MYSQL Database User source. In this case, all users must change his password.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 9, 2018, 10:59pm UTC](https://forum.inductiveautomation.com/t/users-source-migration/19166/4 "2018-08-09T22:59:54Z")

</div>

I don’t think there’s going to be any way to avoid that. The internal DB passwords are salted and hashed.

EDIT: Well, maybe you could. The first piece of the user password column (in square brackets) is the salt, and the remainder is a SHA-256 hash. MySQL has different hash functions built in - presumably you could manipulate your queries into a state where this works.

---

<div class="post-metadata">

**Author:** ![r.lebohec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/r.lebohec/32/3704_2.png) [@r.lebohec](https://forum.inductiveautomation.com/u/r.lebohec)\
**Post date:** [August 10, 2018, 7:17am UTC](https://forum.inductiveautomation.com/t/users-source-migration/19166/5 "2018-08-10T07:17:53Z")

</div>

> [@paul-griffith](#):
>
> The first piece of the user password column (in square brackets) is the salt, and the remainder is a SHA-256 hash. MySQL has different hash functions built in...

As you said before I understand that the password encryption method depend of the database engine?  
May be it could be more easy to update internal SQLITE DB on restore gwbk?
