Description
Environment
Activity

Julio Pasinatto September 23, 2024 at 1:43 PM

inel.pandzic August 22, 2024 at 1:47 PM
Hey @Diogo Recharte no worries and thx for the info.
I was also thinking about this a bit more, and this situation maybe similar to how an initial backup is created with a brand-new PG cluster. In that case, we also create a pg-backup object and it is not a “classical” backup done by the user.
In a similar fashion I think it could be OK that we create a pg-restore object for a new DB created from dataSource
. And at the end of the day, it essentially is a restore so a pg-restore object that identifies it I think is a good thing.
Plus, it will give you guys a way to track it as well.
@ege.gunes @Slava Sarzhan wdyt?

Diogo Recharte August 22, 2024 at 1:26 PM
I’m so sorry @inel.pandzic , I was in the middle of something else and got confused with the scope of this ticket, please disregard my previous comment.
The reason we would like to have the restore object is for consistency with PXC and PSMDB. In those operators we don’t have a data source field so when we want to create a new DB from a backup we first need to create the DB and then we apply the restore CR. This means that users see in the Everest UI that a restoration has happened which is good thing that shows that some data was restored. In PG, since we use the datasource field, users don’t get any feedback/history that some data has been restored from the everest UI standpoint it looks like they just provisioned a fresh/empty database. Having the restore object created automatically will give users a way of tracking the history of restorations in their DB.

inel.pandzic August 22, 2024 at 11:47 AMEdited
Sorry, what do you mean by This is a backup that takes up space in their storage
?
They know about that backup, it was made with a source cluster.

Diogo Recharte August 22, 2024 at 11:37 AM
Hi @inel.pandzic the reason is users' awareness. This is a backup that takes up space in their storage, hiding it from them doesn’t sound good.
Details
Assignee
Julio PasinattoReporter
Diogo RecharteNeeds QA
YesSprint
None
Details
Details
Assignee

Reporter

Needs QA
Sprint
Smart Checklist
Open Smart Checklist
Smart Checklist
Open Smart Checklist
Smart Checklist

Verified. When creating a cluster with
dataSource
a pg-restore bootstrap object is created.kubectl get pg-restore -o yaml apiVersion: v1 items: - apiVersion: pgv2.percona.com/v2 kind: PerconaPGRestore metadata: annotations: pgv2.percona.com/cluster-bootstrap-restore: "true" creationTimestamp: "2024-09-23T13:17:02Z" generation: 1 name: cluster2-bootstrap namespace: test2 resourceVersion: "48512" uid: 82b59b3b-ffee-4c60-a6b0-bbd8b311e33c spec: pgCluster: cluster2 repoName: repo1 status: completed: "2024-09-23T13:17:28Z" state: Succeeded kind: List metadata: resourceVersion: ""