Is MariaDB data lost after Docker setting change?
<p>I've setup a basic MariaDB instance running in Docker - basically from starting the container using the Kitematic UI, changing the settings, and letting it run.</p>

<p>Today, I wanted to make a backup, so I used Kitematic to change the port so I could access it from a machine to make automated backups.  After changing the port in Kitematic, it seems to have started a fresh MariaDB container (i.e. all my data seems to be removed).</p>

<p>Is that the expected behavior?  And, more importantly, is there any way to recover the seemingly missing data, or has it been completely removed?</p>

<p>Also, if the data is actually removed, what is the preferred way to change settings—such as the exposed ports—without losing all changes?  <code>docker commit</code>?</p>

<p><em>Notes:</em></p>

<ul>
<li>running docker 1.12.0 beta for OS X</li>
<li><code>docker -ps a</code> shows the database status as "Up for X minutes" when the original had been up for several days</li>
</ul>

<p>Thanks in advance!</p>

<p><strong>UPDATE:</strong></p>

<p>It looks like the recommended procedure to retain data (without creating a volume or similar) is to:</p>

<ol>
<li>commit changes (e.g. <code>docker commit &lt;containerid&gt; &lt;name/tag&gt;</code>)</li>
<li>take the container offline</li>
<li>update settings such as exposed port or whatever else</li>
<li>run the image with committed changes</li>
</ol>

<p>...taken from <a href="https://stackoverflow.com/a/21374974/1130172">this answer</a>.</p>