# How to recover some data from self hosted?

**URL:** <https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521>\
**Category:** Product Support\
**Created:** [October 15, 2015, 2:26pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521 "2015-10-15T14:26:48Z")\
**Posts on this page:** 13\
**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:** [October 15, 2015, 2:26pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/1 "2015-10-15T14:26:48Z")

</div>

May I recover some data as email text from Mautic self hosted backup?

---

<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:** [October 15, 2015, 2:26pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/2 "2015-10-15T14:26:48Z")

</div>

May I recover some data as email text from Mautic self hosted backup?

---

<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:** [October 16, 2015, 9:09am UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/3 "2015-10-16T09:09:30Z")

</div>

The answer is: Probably yes. Depends on your backup.

The question you wanted to ask is probably how do you recover the data, right? How did you made the backup? An SQL dump?

---

<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:** [October 16, 2015, 1:07pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/4 "2015-10-16T13:07:19Z")

</div>

@escopecz , I’ve backuped whole Mautic folder and generated a SQL file from cPanel’s Mautic database.

---

<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:** [October 19, 2015, 7:13am UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/5 "2015-10-19T07:13:53Z")

</div>

You can open the SQL file and search for the email text. The text will be probably escaped so use tool like [http://www.freeformatter.com/sql-escape.html](http://www.freeformatter.com/sql-escape.html) to revers the escape process.

---

<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:** [November 11, 2015, 8:59pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/6 "2015-11-11T20:59:08Z")

</div>

@escopecz , here’s I’ve been doing:

```auto
1) Unscaped SQL file at URL mentioned
2) Updated lines in SQL file to correct database name and user
3) Uploaded whole Mautic's folder
4) Uploaded SQL file via cPanel
5) Updated lines in LOCAL.PHP to correct database name and user
```

After that still returns the error message: DATABASE CONNECTION ERROR (#1044)

Must Mautic installation folder be same previous name?

---

<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:** [November 11, 2015, 9:27pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/7 "2015-11-11T21:27:02Z")

</div>

Don’t forget to clear the Mautic cache after changing any config file. Easiest is to delete the 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:** [November 11, 2015, 9:39pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/8 "2015-11-11T21:39:34Z")

</div>

@escopecz , Already done it and error persists.

---

<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:** [November 11, 2015, 9:44pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/9 "2015-11-11T21:44:08Z")

</div>

Reading your steps again, #4): where did you upload the file? It has to be imported into a database. In that case don’t do #1). I thought you’ll want to cherry-pick the texts from the database.

---

<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:** [November 12, 2015, 12:38am UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/10 "2015-11-12T00:38:37Z")

</div>

I’ve uploaded it into database manager via cPanel. The reverse way when I did the backup.  
I want to recover the whole system since texts to campaings.

---

<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:** [November 12, 2015, 12:50am UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/11 "2015-11-12T00:50:25Z")

</div>

@escopecz , I’ve been trying to install a fresh new Mautic app via FTP just for testing and I got this message when trying to forward to step 2:  
An error occured while attempting to connect to the database: SQLSTATE[28000] [1045] Access denied for user ‘mautic’@‘localhost’ (using password: YES)

---

<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:** [November 12, 2015, 9:21am UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/12 "2015-11-12T09:21:50Z")

</div>

Your username or password must be wrong.

---

<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:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/how-to-recover-some-data-from-self-hosted/2521/13 "2020-02-02T22:57:12Z")

</div>


