# External persistence

**URL:** <https://community.hivemq.com/t/external-persistence/1081>\
**Category:** Uncategorized\
**Created:** [March 15, 2022, 11:55am UTC](https://community.hivemq.com/t/external-persistence/1081 "2022-03-15T11:55:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMRM](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@AMRM](https://community.hivemq.com/u/AMRM)\
**Post date:** [March 15, 2022, 11:55am UTC](https://community.hivemq.com/t/external-persistence/1081/1 "2022-03-15T11:55:46Z")

</div>

Hello

We are using the HiveMQ Community Edition docker image (+ our custom auth extension) on our Kubernetes cluster.

What is the preferable way to back up sessions, subscriptions, retained messages, so the HiveMQ instance can be crashed/restarted, redeployed, and upgraded without losing data?

Best regards

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [March 18, 2022, 2:03pm UTC](https://community.hivemq.com/t/external-persistence/1081/2 "2022-03-18T14:03:58Z")

</div>

Hello Amrerm,

HiveMQ always persists its data, by default it is $HIVEMQ\_HOME/data directory.  
You can change the folder by following [the user guide](https://www.hivemq.com/docs/4.1/hivemq/configuration.html#folders).

I hope this helps,  
Kind regards,  
Dasha from HiveMQ Team
