zalando / zalando/postgres-operator

restore backups are missing vital information

Open
#2,197 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Using 1.8.2 with non-aws s3 for backup.

We tried to follow: https://postgres-operator.readthedocs.io/en/latest/user/#clone-directly
setting:

 apiVersion: acid.zalan.do/v1
 kind: postgresql
 metadata:
   name: mattermost-pgsql
 spec:
   env:
   - name: AWS_SECRET_ACCESS_KEY
     valueFrom:
       secretKeyRef:
         name: mattermost-pgsql-postgres-pod-env
         key: AWS_SECRET_ACCESS_KEY
   databases:
     mattermost: mattermost
   preparedDatabases:
     mattermost: {}
   enableMasterLoadBalancer: false
   numberOfInstances: 1
   postgresql:
     version: "12"
   teamId: mattermost
   users:
     mattermost:
     - superuser
   clone:
     cluster: "mattermost-pgsql"  # Inplace restore when having the same cluster name as the source
     timestamp: "2022-05-03T19:50:00+00:00"  # timezone required (offset relative to UTC, see RFC 3339 section 5.6)
   volume:
     size: 8Gi

But that fails with:
2023-01-30 10:51:02,543 - bootstrapping - WARNING - Cloning with WAL-E is only possible when CLONE_WALE_PREFIX or CLONE_WALGPREFIX or CLONE_WAL*_BUCKET and CLONE_SCOPE are set.
and does onthing

Turns out we NEED to also set some CLONE_WALG_.. settings (since postgres-operator uses walg for backups it seems ?)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked clone-directly documentation and the bootstrapping warning about CLONE_WALE_, CLONE_WALG_ and CLONE_WAL_* settings. Trace how the restore configuration handles non-AWS S3 and identify what information or settings are missing; done means the documented clone configuration can proceed without the reported warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.