# Manually restoring multiple times is not working

**URL:** <https://forums.percona.com/t/manually-restoring-multiple-times-is-not-working/27301>\
**Category:** Percona Operator for PostgreSQL\
**Tags:** percona, postgres\
**Created:** [December 21, 2023, 11:53am UTC](https://forums.percona.com/t/manually-restoring-multiple-times-is-not-working/27301 "2023-12-21T11:53:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaurya\_Goel1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shaurya_goel1/32/11040_2.png) [@Shaurya\_Goel1](https://forums.percona.com/u/Shaurya_Goel1)\
**Post date:** [December 21, 2023, 11:53am UTC](https://forums.percona.com/t/manually-restoring-multiple-times-is-not-working/27301/1 "2023-12-21T11:53:00Z")

</div>

## Description:

I did a manual backup by creating a **PerconaPGBackup** object. Then, I deleted a table from the database and tried to restore it manually into the cluster which is running by creating a **PerconaPGRestore** object. It successfully ran the first time, but, after running it more than once, I am getting an error in the operator logs- “Waiting for another restore to finish”.

## Steps to Reproduce:

1. Create a cluster with 1 replica and set repo3 for backup to GCS. There is no **pmm** and no **pgBouncer**.
2. Fill some data in the Postgres in a table.
3. Create a **PerconaPGBackup** kind which backs up the database and then apply it. This backs up the data created in step 2 to the GCS bucket.
4. Delete the data created in step 2 from the Postgres.
5. Restore the database in the current cluster using a **PerconaPGRestore** object. This should be the same as that in step 2.
6. After the restore is completed and the Postgres instance pod is running again, delete the data which was restored in step 5.
7. Create another **PerconaPGRestore** object and apply it. We can see an error in the operator logs.

## Version:

2.2.0  
Using the docker image- percona/percona-postgresql-operator:2.2.0-ppg14-\*

## Logs:

time=“2023-12-21T11:45:17Z” level=info msg=“Waiting for another restore to finish” PerconaPGRestore=postgres-operator/manual-restore controller=perconapgrestore [controllerGroup=pgv2.percona.com](http://controllerGroup=pgv2.percona.com) controllerKind=PerconaPGRestore name=manual-restore namespace=postgres-operator reconcileID=3969fd5a-9ddd-4c6d-ad36-69e0b8dcfa6b request=postgres-operator/manual-restore version=  
time=“2023-12-21T11:45:22Z” level=info msg=“Waiting for another restore to finish” PerconaPGRestore=postgres-operator/manual-restore controller=perconapgrestore [controllerGroup=pgv2.percona.com](http://controllerGroup=pgv2.percona.com) controllerKind=PerconaPGRestore name=manual-restore namespace=postgres-operator reconcileID=f3089a46-5ee8-42b0-b441-bef360b029a0 request=postgres-operator/manual-restore version=  
…  
(Repeats indefinitely)

## Expected Result:

A new pod is created which restores the data.

## Actual Result:

Nothing happens except the logs in the operator.

## Additional Information:

---

<div class="post-metadata">

**Author:** ![Agustin\_G](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/agustin_g/32/14111_2.png) [@Agustin\_G](https://forums.percona.com/u/Agustin_G)\
**Post date:** [January 16, 2024, 7:03pm UTC](https://forums.percona.com/t/manually-restoring-multiple-times-is-not-working/27301/2 "2024-01-16T19:03:01Z")

</div>

Hi @Shaurya_Goel1,

This looks like a bug, and since you have a clear reproducible scenario, I would send all of this to a new Jira ticket:  
[https://perconadev.atlassian.net/jira/software/c/projects/K8SPG](https://perconadev.atlassian.net/jira/software/c/projects/K8SPG)

---

<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:** [January 17, 2024, 3:56pm UTC](https://forums.percona.com/t/manually-restoring-multiple-times-is-not-working/27301/3 "2024-01-17T15:56:33Z")

</div>

@Shaurya_Goel1 I can’t reproduce this issue ☹ Could you please provide your CRs. I need to know more about how you back up and restore your cluster.

---

<div class="post-metadata">

**Author:** ![coaler](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/coaler/32/17033_2.png) [@coaler](https://forums.percona.com/u/coaler)\
**Post date:** [June 25, 2024, 10:17am UTC](https://forums.percona.com/t/manually-restoring-multiple-times-is-not-working/27301/4 "2024-06-25T10:17:02Z")

</div>

I had the same problem. I solved it by removing the annotation `postgres-operator.crunchydata.com/pgbackrest-restore` in the resources `PostgresCluster` and `PerconaPGCluster`. I also set `enabled` to `false` in `spec.backups.pgbackrest.restore`, but I am not sure if that was necessary.

I am not sure about the cause because I can now issue new restores even without removing the annotations. I initially installed the operator on k8s 1.22 (now on 1.23), which is not supported - maybe this could have had an influence.

---

<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 6, 2024, 9:53am UTC](https://forums.percona.com/t/manually-restoring-multiple-times-is-not-working/27301/5 "2024-09-06T09:53:45Z")

</div>

@coaler @Shaurya_Goel1 I have reproduced it and created the task [[K8SPG-637] - Percona JIRA](https://perconadev.atlassian.net/browse/K8SPG-637) to fix it. We will include the fix in 2.6.0.
