# It is not possible to restore the database in place (new feature of version v2.2 using a cr.yaml)

**URL:** <https://forums.percona.com/t/it-is-not-possible-to-restore-the-database-in-place-new-feature-of-version-v2-2-using-a-cr-yaml/24390>\
**Category:** Percona Operator for PostgreSQL\
**Created:** [August 11, 2023, 1:02pm UTC](https://forums.percona.com/t/it-is-not-possible-to-restore-the-database-in-place-new-feature-of-version-v2-2-using-a-cr-yaml/24390 "2023-08-11T13:02:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergey\_Zhuravlev](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_zhuravlev/32/6410_2.png) [@Sergey\_Zhuravlev](https://forums.percona.com/u/Sergey_Zhuravlev)\
**Post date:** [August 11, 2023, 1:02pm UTC](https://forums.percona.com/t/it-is-not-possible-to-restore-the-database-in-place-new-feature-of-version-v2-2-using-a-cr-yaml/24390/1 "2023-08-11T13:02:10Z")

</div>

Hi!  
and there seems to be an inaccuracy in the documentation  
The documentation says:

```auto
restore in-place, to an existing cluster (note that this is destructive) using the backups.restore subsection.

```

link leads to here:

> **[Percona Operator for PostgreSQL - Custom Resource options](https://docs.percona.com/percona-operator-for-postgresql/2.0/operator.html)**
>
> The Cluster is configured via the
> deploy/cr.yaml file.

and there in the backup section there is nothing about the restore

after looking into this:

> <https://github.com/percona/percona-postgresql-operator/blob/main/deploy/crd.yaml>

and an example cr.yaml file

it became clear that this:

spec.backups.pgbackrest.restore

making a setting there and applying the modified cr.уaml  
see in restore section there are no errors in the operator logs

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/7/725cd2b2363e4ba36c5105da088d69e249c4c400.png)

but the restore is not done

Question: Has anyone tested this? Has anyone received such a restore in place?  
Or am I doing something or misunderstanding?

---

<div class="post-metadata">

**Author:** ![Slava\_Sarzhan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/slava_sarzhan/32/3196_2.png) [@Slava\_Sarzhan](https://forums.percona.com/u/Slava_Sarzhan)\
**Post date:** [September 11, 2023, 5:29pm UTC](https://forums.percona.com/t/it-is-not-possible-to-restore-the-database-in-place-new-feature-of-version-v2-2-using-a-cr-yaml/24390/2 "2023-09-11T17:29:27Z")

</div>

Hi @Sergey_Zhuravlev, please read the following doc about backups and restore [Restore from a backup - Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/2.0/backups-restore.html#restore-to-an-existing-postgresql-cluster) . As you can see, we have a separate objecst to perform backups and restores. Example for restore [https://github.com/percona/percona-postgresql-operator/blob/main/deploy/restore.yaml](https://github.com/percona/percona-postgresql-operator/blob/main/deploy/restore.yaml) . Also, you can check our test [https://github.com/percona/percona-postgresql-operator/tree/main/e2e-tests/tests/demand-backup](https://github.com/percona/percona-postgresql-operator/tree/main/e2e-tests/tests/demand-backup) for this feature as well. If you have any questions just ping me and I will help you.
