# How to backup?

**URL:** <https://forum.mautic.org/t/how-to-backup/2427>\
**Category:** Product Support\
**Created:** [September 28, 2015, 2:29pm UTC](https://forum.mautic.org/t/how-to-backup/2427 "2015-09-28T14:29:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 28, 2015, 2:29pm UTC](https://forum.mautic.org/t/how-to-backup/2427/1 "2015-09-28T14:29:48Z")

</div>

Hi,  
  
  
  
How could I execute a whole backup step-by-step?

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 28, 2015, 2:29pm UTC](https://forum.mautic.org/t/how-to-backup/2427/2 "2015-09-28T14:29:48Z")

</div>

Hi,

How could I execute a whole backup step-by-step?

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 29, 2015, 2:18pm UTC](https://forum.mautic.org/t/how-to-backup/2427/3 "2015-09-29T14:18:53Z")

</div>

@escopecz / @chad.windnagle

Could you help how to?:

1. Reset all infos about campaign events, click tracking, etc… (my tests has finished but there’s some garbage)
2. Full backup for domain changing. I’d like to run Mautic from domain “A” to “B” keeping all settings, templates, everything ready to start over domain “B”.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 30, 2015, 7:09am UTC](https://forum.mautic.org/t/how-to-backup/2427/4 "2015-09-30T07:09:55Z")

</div>

1. Mautic doesn’t have a button to clear all stats data. You can suggest it on GitHub as feature request.
2. There is no tool for backup. Actually, I’m working on Migration Bundle actually which will help to export all database entities with data, themes, plugins and install them in a new fresh Mautic instance. It will not probably be ready for 1.2.1, but I should make it for 1.2.2. You’ll have to move files and database manually, update app/config/local.php to connect to new database and clear cache (delete app/cache folder).

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 30, 2015, 12:44pm UTC](https://forum.mautic.org/t/how-to-backup/2427/5 "2015-09-30T12:44:24Z")

</div>

@escopecz , Teach us how to clear stats (if it’s possible) and to backup manually.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 30, 2015, 12:52pm UTC](https://forum.mautic.org/t/how-to-backup/2427/6 "2015-09-30T12:52:40Z")

</div>

Clear stats: If you really wish to clear stats, go to database and truncate the tables the stats are stored in. It can cause data loss or unexpected behavior of Mautic so Backup database first so you have something to get back to. Or, clone the campaign/form/page or whatever you want to clear stats for. Stats data will not be cloned. Just the configuration. Then you can delete the entity with testing stats data.

Backup: Backup the files and database. How to move Mautic between servers was described in my previous post:

> [@](#):
>
> You’ll have to move files and database manually, update app/config/local.php to connect to new database and clear cache (delete app/cache folder).

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 30, 2015, 2:01pm UTC](https://forum.mautic.org/t/how-to-backup/2427/7 "2015-09-30T14:01:42Z")

</div>

> [@3501:@escopecz](#):
>
> Clear stats: If you really wish to clear stats, go to database and truncate the tables the stats are stored in.

Could you describe step-by-step?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 30, 2015, 2:06pm UTC](https://forum.mautic.org/t/how-to-backup/2427/8 "2015-09-30T14:06:34Z")

</div>

I’d rather won’t go into details. There is many different stats in different tables. The tables have relations between each other, so I don’t know what troubles it can cause. Feel free to try it yourself (backup first!) and let us know how it went.

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 30, 2015, 2:10pm UTC](https://forum.mautic.org/t/how-to-backup/2427/9 "2015-09-30T14:10:30Z")

</div>

@escopecz , would be valid delete actual user and database (after backup) and then create both again?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 30, 2015, 2:16pm UTC](https://forum.mautic.org/t/how-to-backup/2427/10 "2015-09-30T14:16:38Z")

</div>

Sure you can do that. You’ll have to install Mautic again and your data will be lost (or in the backup file). Not sure what your goal is with this operation.

If you want to start fresh without any data you’ve created so far, remove app/config/local.php (backup first) and clear cache. Then Mautic allows you to install fresh database again.

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 30, 2015, 2:22pm UTC](https://forum.mautic.org/t/how-to-backup/2427/11 "2015-09-30T14:22:32Z")

</div>

> [@3507:@escopecz](#):
>
> Not sure what your goal is with this operation.

I’ve been made several test on campaign events, filling forms and triggering emails. Now dashboard and another menus show stats data based on tests and I’m just want clean all of it.

---

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 25, 2016, 2:03pm UTC](https://forum.mautic.org/t/how-to-backup/2427/12 "2016-06-25T14:03:05Z")

</div>

so by downloading the mautic directory all the emails, campagins, landing pages and forms are saved?  
and the contact data is saved in the sql?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 25, 2016, 3:35pm UTC](https://forum.mautic.org/t/how-to-backup/2427/13 "2016-06-25T15:35:29Z")

</div>

Oh great, many thanks for your help:)

---

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 25, 2016, 1:03pm UTC](https://forum.mautic.org/t/how-to-backup/2427/14 "2016-06-25T13:03:55Z")

</div>

Bump

---

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 22, 2016, 6:32pm UTC](https://forum.mautic.org/t/how-to-backup/2427/15 "2016-06-22T18:32:37Z")

</div>

Any update on ways to back up our Mautic campaigns, emails, landing pages, themes, forms, contacts, assets, etc?  
A plugin to export and be able to re-import into a new installation would be really beneficial.  
I am quite nervous doing so much work on Mautic, when all could be lost with a server failure.  
any update would be appreciated!  
Thanks

---

<div class="post-metadata">

**Author:** ![BT4](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@BT4](https://forum.mautic.org/u/BT4)\
**Post date:** [September 11, 2016, 2:01am UTC](https://forum.mautic.org/t/how-to-backup/2427/16 "2016-09-11T02:01:39Z")

</div>

Nice… OK I got a question:

I got the MAUTIC PRO on their server… how do I back my stuff off ???

---

<div class="post-metadata">

**Author:** ![Paul999](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/paul999/32/156_2.png) [@Paul999](https://forum.mautic.org/u/Paul999)\
**Post date:** [February 5, 2017, 6:06pm UTC](https://forum.mautic.org/t/how-to-backup/2427/17 "2017-02-05T18:06:51Z")

</div>

I’d also really like to see a way to reset Mautic’s statistics. Even if it’s just a database query, I’d be fine with that.

Just trying to truncate the database and praying things don’t break is not a feasable option I feel.

---

<div class="post-metadata">

**Author:** ![Paul999](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/paul999/32/156_2.png) [@Paul999](https://forum.mautic.org/u/Paul999)\
**Post date:** [February 5, 2017, 11:45pm UTC](https://forum.mautic.org/t/how-to-backup/2427/18 "2017-02-05T23:45:28Z")

</div>

With reset I meant just a reset of all the statistics. But I changed my mind about this…

What I feel would be a much better alternative is to be able to specify contacts/emails that will be excluded from the tracking statistics. So that any testing that’s done with them won’t skew the statistics of the live campaigns.

---

<div class="post-metadata">

**Author:** ![JBBT](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@JBBT](https://forum.mautic.org/u/JBBT)\
**Post date:** [March 7, 2017, 9:13am UTC](https://forum.mautic.org/t/how-to-backup/2427/19 "2017-03-07T09:13:25Z")

</div>

But you can come a few steps closer by adjusting the dates.

When insite the specifik email - you will se a graphic to the left “Contact Segments Comparison”: Email sent, email read, email failed etc. To the right of this graphic you find the dates - and here you are able to change the dates.

So if you have testet up until yesterday - change the start date to the date that you have everything lined up - and you will see your relevant stats - at least in the grapics. But I guess it works as well with the “Click Counts” below.

Hope this can help someone.

---

<div class="post-metadata">

**Author:** ![ivanbruno10](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ivanbruno10/32/191_2.png) [@ivanbruno10](https://forum.mautic.org/u/ivanbruno10)\
**Post date:** [July 5, 2017, 1:44pm UTC](https://forum.mautic.org/t/how-to-backup/2427/20 "2017-07-05T13:44:25Z")

</div>

Which folder is the database in? Which file should I save to back up the mautic database?

[Next page](https://forum.mautic.org/t/how-to-backup/2427.md?page=2)
