<p>You need to use a <a href="https://docs.openshift.com/enterprise/3.1/dev_guide/persistent_volumes.html" rel="nofollow noreferrer">Persitent Volume</a>.</p>

<p>Your <code>/path_to_data/openshiftdata</code> is probably on a disk that belongs to the pod and is being destroyed each time.</p>

CC BY-SA 3.0
2018-03-20T01:12:59.217Z
My path_to_data is set to a folder in my home directory, I don't think it can be owned by the pod. My Openshift project and it's pod were being destroyed when I shut down Openshift until I started using the switches above.
DemiSheep
CC BY-SA 4.0
2019-12-23T09:06:13.397Z
I undeleted this post as it looks like a valuable answer to me. Please let me know if you disagree.
030
CC BY-SA 4.0
2018-03-19T16:54:25.683Z
2019-12-23T09:05:21.930Z
2019-12-23T09:05:21.930Z
Essex Boy
<p>I have a pod in Redhat Openshift running Tomcat and inside Tomcat I have Ozone Widget Framework, my site hosted in Tomcat. I have executed the <code>oc</code> command to use my existing configuration so that my pod won't disappear and lose my session and data. I ran </p>

<p><code>oc cluster up --host-data-dir=/path_to_data/openshiftdata --use-existing-config</code></p>

<p>But after making changes within OWF, when I take down the cluster and bring it back up my pod lives on, but my OWF instance is reverted back to it's default state.</p>

<p>How do I get Openshift to let Tomcat retain OWF's state?</p>

<docker><kubernetes><openshift>
How do I get Openshift to let Tomcat retain it's hosted site's changes
DemiSheep
# How do I get Openshift to let Tomcat retain it's hosted site's changes

(Asked by: username_0 on 2018-03-19)

I have a pod in Redhat Openshift running Tomcat and inside Tomcat I have Ozone Widget Framework, my site hosted in Tomcat. I have executed the `oc` command to use my existing configuration so that my pod won't disappear and lose my session and data. I ran

`oc cluster up --host-data-dir=/path_to_data/openshiftdata --use-existing-config`

But after making changes within OWF, when I take down the cluster and bring it back up my pod lives on, but my OWF instance is reverted back to it's default state.

How do I get Openshift to let Tomcat retain OWF's state?

**Tags:** docker, kubernetes, openshift


---

## 1 answers

### Answer by username_1 on 2018-03-19. Score: 1

You need to use a [Persitent Volume](https://docs.openshift.com/enterprise/3.1/dev_guide/persistent_volumes.html).

Your `/path_to_data/openshiftdata` is probably on a disk that belongs to the pod and is being destroyed each time.

> **Comments:**
> **username_0**: My path_to_data is set to a folder in my home directory, I don't think it can be owned by the pod. My Openshift project and it's pod were being destroyed when I shut down Openshift until I started using the switches above.  
> **username_2**: I undeleted this post as it looks like a valuable answer to me. Please let me know if you disagree.  

---

