zalando / zalando/postgres-operator

No support for SCOPE_PREFIX in logical-backup, which *is* supported in WAL backups

Open
#2,039 0 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

https://github.com/zalando/postgres-operator/blob/a081173f26f2d6b7dd6408d7cee8b307fd8e6578/docker/logical-backup/dump.sh#L100

I've set a SCOPE_PREFIX in my operator deployment to "${machine_name}/", so that the path in the bucket is "/spilo/${machine_name}/${postgres_name}/${guid}". However, the logical backups are stored into "/spilo/${postgres_name}/${guid}". The PREFIX is set via terraform, to the name of the cluster being created(inside hetzner, but that doesn't matter for this issue). Having a per-cluster prefix lets me clear out all backups when the cluster is being purged(for developer instances), instead of having to use lots and lots of per-developer buckets.

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 docker/logical-backup/dump.sh around line 100 and compare how SCOPE_PREFIX is handled for WAL backups. Confirm that logical-backup objects include the configured scope prefix, producing the same per-cluster bucket path behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, postgresql, shell, terraform
Domain
databases, infrastructure
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.