# Help with DB migration from 2.16.5 to 3.2.4

**URL:** <https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157>\
**Category:** Product Support\
**Created:** [April 24, 2021, 8:49am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157 "2021-04-24T08:49:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jribeiro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jribeiro/32/1003_2.png) [@jribeiro](https://forum.mautic.org/u/jribeiro)\
**Post date:** [April 24, 2021, 8:49am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/1 "2021-04-24T08:49:05Z")

</div>

**Your software**  
My Mautic version is: 2.16.5  
My PHP version is: 7.3.27  
My Database type and version is: MySQL 5.7  
My environment is hosted environment in linux with Apache (OVH)

**Your problem**  
I have tried to update my production 2.16.5 version using the button but never worked. So I have installed a totally new fresh version of 3.2.4 in a test environment that is working. But now I would like to have some advise about what I should do to download the database from 2.16.5 and upload it to the 3.2.4 environment. I guess that only backup and restore will not work.  
Thank you in advance for support and help from community  
Jose

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [April 24, 2021, 8:55am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/2 "2021-04-24T08:55:22Z")

</div>

Hi there,

I would suggest you pull your production Mautic instance into a development area, run the migration there, and then you will have an updated database.

There is no other supported way to update to Mautic 3 other than using the provided upgrade script.

---

<div class="post-metadata">

**Author:** ![jribeiro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jribeiro/32/1003_2.png) [@jribeiro](https://forum.mautic.org/u/jribeiro)\
**Post date:** [April 24, 2021, 9:24am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/3 "2021-04-24T09:24:16Z")

</div>

When you say to use the provided script are you referring to upgrade\_v3.php that is in the production environment or upgrade.php that comes with the 3.2.4-update.zip. I am asking as the upgrade\_v3.php never worked as well as the button… it was always hanged (I guess loop).

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [April 24, 2021, 9:39am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/4 "2021-04-24T09:39:05Z")

</div>

The only way to update from 2-\>3 is via the upgrade script.

You should do the update at the command line if it is hanging in the UI.

Use the same commands that you would use with a [regular update](https://docs.mautic.org/en/setup/updating-at-command-line) and it will step you through the update.

---

<div class="post-metadata">

**Author:** ![jribeiro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jribeiro/32/1003_2.png) [@jribeiro](https://forum.mautic.org/u/jribeiro)\
**Post date:** [April 24, 2021, 11:30am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/5 "2021-04-24T11:30:38Z")

</div>

Thank you. I will try to do it in that way. Let’s see if finally I will be lucky 🙂

---

<div class="post-metadata">

**Author:** ![jribeiro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jribeiro/32/1003_2.png) [@jribeiro](https://forum.mautic.org/u/jribeiro)\
**Post date:** [April 25, 2021, 6:10am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/6 "2021-04-25T06:10:17Z")

</div>

No I was not lucky ☹  
I executed mautic command:

### Executing console mautic:update:find

Version 3.2.4 of Mautic is available for download. Please visit [https://www.mautic.org/blog/community/mautic-3-building-stable-foundations](https://www.mautic.org/blog/community/mautic-3-building-stable-foundations) for more information. To update, you can run ‘php upgrade\_v3.php’ from the command line.

Then tried apply

### Executing console mautic:update:apply

Update aborted.

And then the php upgrade\_v3.php hanged again.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/adbd8ee1cae9538103a5a5fc16ab96d9476cb61f.png)

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [April 25, 2021, 7:28am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/7 "2021-04-25T07:28:36Z")

</div>

You need to run that command at the command line.

Type what it says - `php upgrade_v3.php` - in your terminal and it will step you through one step at a time.

No need to open it in the browser!

---

<div class="post-metadata">

**Author:** ![jribeiro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jribeiro/32/1003_2.png) [@jribeiro](https://forum.mautic.org/u/jribeiro)\
**Post date:** [April 25, 2021, 8:07am UTC](https://forum.mautic.org/t/help-with-db-migration-from-2-16-5-to-3-2-4/19157/8 "2021-04-25T08:07:48Z")

</div>

Sorry to bother you with this matter. I have my instances hosted so I can not access to the terminal as you suggested
