# Upgrade mautic from 2.16.5 to 4.4.9

**URL:** https://forum.mautic.org/t/upgrade-mautic-from-2-16-5-to-4-4-9/30061
**Category:** General Discussion
**Created:** [November 28, 2023, 7:54am UTC](https://forum.mautic.org/t/upgrade-mautic-from-2-16-5-to-4-4-9/30061 "2023-11-28T07:54:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vvarade](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vvarade](https://forum.mautic.org/u/vvarade)
#### Post date: [November 28, 2023, 7:54am UTC](https://forum.mautic.org/t/upgrade-mautic-from-2-16-5-to-4-4-9/30061/1 "2023-11-28T07:54:07Z")

</div>

Hi team,

We are currently using mautic 2.16.5 and want to upgrade it to 4.4.9. However I created a new mautic instance 4.4.9 and tried to do database migration but it is not working as there are multiple errors which i am receiving while dumping the data to new DB.

Also i tried a manual approach where I just copied the contacts and emails from old DB to new DB it worked fine. However it was not having the statistical data as well as images in email was missing.

Can someone suggest me the best approach which I should be following for the upgrade.

Regards,  
Vikas Varade

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [November 28, 2023, 8:15am UTC](https://forum.mautic.org/t/upgrade-mautic-from-2-16-5-to-4-4-9/30061/2 "2023-11-28T08:15:52Z")

</div>

Hello Vikas, you need to do it step by step.

[![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/490d2c89586b2941714ac01d17548f942c621ca5.jpeg "Halloween Edition: the Scary Mautic Upgrade 2.16 to 4.01 (Marketing Automation Show 2x03)") ](https://www.youtube.com/watch?v=Qy0jJ09AD5E)

If you need further help, I can do this migration for you.  
Joey

---

<div class="post-metadata">

### Author: ![vvarade](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vvarade](https://forum.mautic.org/u/vvarade)
#### Post date: [November 28, 2023, 10:14am UTC](https://forum.mautic.org/t/upgrade-mautic-from-2-16-5-to-4-4-9/30061/3 "2023-11-28T10:14:35Z")

</div>

Thanks Joey ! I just missed to inform that I have deployed the mautic on the kubernetes cluster.

I am using below code as deployment manifest.

apiVersion: apps/v1  
kind: Deployment  
metadata:  
namespace: mautic  
name: mautic  
labels:  
app: mautic  
spec:  
replicas: 1  
selector:  
matchLabels:  
app: mautic  
template:  
metadata:  
labels:  
app: mautic  
spec:  
containers:  
- image: mautic/mautic:v4  
name: mautic  
env:  
- name: MAUTIC\_DB\_HOST  
value: XXXXXXXX  
- name: MAUTIC\_DB\_USER  
value: XXXXXXXX  
- name: MAUTIC\_DB\_PASSWORD  
valueFrom:  
secretKeyRef:  
name: lovia-prod-mautic  
key: db-password  
- name: MAUTIC\_DB\_NAME  
value: mautic  
- name: MAUTIC\_RUN\_CRON\_JOBS  
value: ‘true’  
#- name: MAUTIC\_TRUSTED\_PROXIES  
# value: nginx-ingress-controller.default.svc.cluster.local  
#value: 192.168.140.0/32  
ports:  
- containerPort: 80  
name: mautic  
# Commenting below working code for Volume  
volumeMounts:  
- mountPath: “/var/www/html”  
name: mautic-var-www-html  
# Health check  
#livenessProbe:  
# initialDelaySeconds: 10  
# periodSeconds: 10  
# httpGet:

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [November 28, 2023, 11:48am UTC](https://forum.mautic.org/t/upgrade-mautic-from-2-16-5-to-4-4-9/30061/4 "2023-11-28T11:48:51Z")

</div>

Oh okay.  
I hope someone who knows kubernetes will share the solution.
