# How to use the operator to restore a database with snapshot of the pvc

**URL:** <https://forums.foundationdb.org/t/how-to-use-the-operator-to-restore-a-database-with-snapshot-of-the-pvc/2737>\
**Category:** Kubernetes Operator\
**Tags:** operator\
**Created:** [June 8, 2021, 7:09pm UTC](https://forums.foundationdb.org/t/how-to-use-the-operator-to-restore-a-database-with-snapshot-of-the-pvc/2737 "2021-06-08T19:09:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tangerine](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/tangerine/32/1084_2.png) [@tangerine](https://forums.foundationdb.org/u/tangerine)\
**Post date:** [June 8, 2021, 7:09pm UTC](https://forums.foundationdb.org/t/how-to-use-the-operator-to-restore-a-database-with-snapshot-of-the-pvc/2737/1 "2021-06-08T19:09:05Z")

</div>

Hi,  
What is the proper step if any to use the operator to restore a database from a snapshot of the pvc(s)?  
The case is like this: We have a running operator/fdb cluster. Then we took a snapshot of all the pvc that belongs to that cluster while we stopped any write transaction.  
We then removed this cluster and then redeploy the operator and restored the pvc. But we found that the operator does not reinitialize the cluster by updating the ip of the cluster file so the db cannot come up.  
So, what are the proper steps in order to handle this? Is this case supported?

---

<div class="post-metadata">

**Author:** ![john\_brownlee](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/john_brownlee/32/22_2.png) [@john\_brownlee](https://forums.foundationdb.org/u/john_brownlee)\
**Post date:** [June 8, 2021, 7:14pm UTC](https://forums.foundationdb.org/t/how-to-use-the-operator-to-restore-a-database-with-snapshot-of-the-pvc/2737/2 "2021-06-08T19:14:54Z")

</div>

We don’t have full automation for this kind of restore flow, but @Daniel-B-Smith has been exploring a similar space and may be able to give you some pointers.

---

<div class="post-metadata">

**Author:** ![tangerine](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/tangerine/32/1084_2.png) [@tangerine](https://forums.foundationdb.org/u/tangerine)\
**Post date:** [June 9, 2021, 1:17am UTC](https://forums.foundationdb.org/t/how-to-use-the-operator-to-restore-a-database-with-snapshot-of-the-pvc/2737/3 "2021-06-09T01:17:40Z")

</div>

Currently, we don’t need it to be automated. We are trying to achieve that in a programatic way. So, any pointers are welcome

---

<div class="post-metadata">

**Author:** ![tangerine](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/tangerine/32/1084_2.png) [@tangerine](https://forums.foundationdb.org/u/tangerine)\
**Post date:** [June 9, 2021, 1:33am UTC](https://forums.foundationdb.org/t/how-to-use-the-operator-to-restore-a-database-with-snapshot-of-the-pvc/2737/4 "2021-06-09T01:33:14Z")

</div>

What we have tried so far is:  
The PVC are all restored.  
All pods started.  
We manually updated the cluster file in /var/dynamic-conf/fdb.cluster and also updated the ConfigMap.  
We killed the server process and restart it.  
In fdbcli, it says it can reach the host but no record in the DB.  
So, we don’t know what steps do we miss.
