postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Select specific timeline during restore / clone possible?

Open thedatabaseme opened this issue 3 years ago • 5 comments

Hello,

I have the question if there is any possibility to select a specific timeline one wants to restore to in the clone section of the postgres CRD. I haven't found anything regarding timelines in the documentation (also not in the Spilo repo). I assume, that because a restore should be done as a clone, you see no need for implementing this. But I'm not sure. Nevertheless, although it is not documented, it's possible to restore a cluster / database as a replacement of an existing cluster by deleting it before, then doing a clone with all the same settings in the CRD and specifying a point in time to recover to. A new timeline will be created after the restore is finished. In some complex restore scenarios it might then be needed to specify a timeline to restore as a target.

In the postgresql.conf the recovery settings always look like this:

recovery_target_action = 'promote'
recovery_target_time = '2022-03-11T10:46:00+00:00'
recovery_target_timeline = 'latest'
restore_command = 'envdir "/run/etc/wal-e.d/env-clone-haberkernp-backup-test" /scripts/restore_command.sh "%f" "%p"'
  • Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.7.1
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s] Selfthosted K8s
  • Are you running Postgres Operator in production? [yes | no] yes
  • Type of issue? [Bug report, question, feature request, etc.] question, maybe feature request

thedatabaseme avatar Mar 31 '22 07:03 thedatabaseme