<p>I have put neo4j community edition(v3.2.2) into kubernetes. But the community edition do not support hot backup so I have to shut it down for backup/restore data. </p>

<p>I tried:</p>

<pre><code>kubectl exec neo4j-0 /var/lib/neo4j/bin/neo4j stop
</code></pre>

<p>but it shows:</p>

<pre><code>Neo4j not running
</code></pre>

<p>also tried:</p>

<pre><code>kubectl exec -it neo4j-0 bash
/var/lib/neo4j/bin/neo4j stop
</code></pre>

<p>but still can't stop the neo4j in container</p>

<pre><code>Neo4j not running
</code></pre>

<p>Does any body have a solution?</p>

Miko
<p>You can not stop the main process inside a container, otherwise it will be considered as dead and Kubernetes will terminate this pod and schedule a new healthy one. </p>

<p>Also Kubernetes does not support suspending pods. It's cheaper to stop/start pods.</p>

<p>So, in your case, I'd recommend to down scale you deployment to zero replicas during backup </p>

<pre><code>kubectl scale --replicas=0 deployment/neo4j
</code></pre>

<p>and up scale back to required replicas once backup is completed</p>

<pre><code>kubectl scale --replicas=1 deployment/neo4j
</code></pre>
