Skip to content

Add support for Barman Cloud backups #498

Open

Description

@DRSchlaubi

Currently the only supported backup method is based on Volume Snapshots. However Volume snapshots are not supported by every CSI and sometimes cost more than simple object storage it would make sense to also enable the existing CNPG backup functionality through barman cloud. Is there any huge blocker which would currently prevent this?

Activity

  1. added
    enhancement
    go
    on Nov 5, 2026
  2. documentdb-triage-tool commented on Nov 5, 2026

    @documentdb-triage-tool

    🤖 Auto-triaged by documentdb-triage-tool.

    Applied: go, enhancement
    Project fields suggested: Component api · Priority P2 · Effort XL · Status Triage
    Confidence: 0.72 (llm)

    Reasoning

    LLM: Adding Barman Cloud backup support is a significant new feature requiring API, controller, and potentially manifest changes across multiple components.

    If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

  3. WentingWu666666 commented on Nov 9, 2026

    @WentingWu666666
    Collaborator

    @DRSchlaubi Thanks for raising this! The initial backup implementation focused on volume snapshots. Optional Barman Cloud support would be a welcome addition, though there’s no implementation planned at the moment.

    Is this something you need for a current or upcoming deployment? Contributions are also welcome if you’re interested—we can discuss the approach here first.

  4. DRSchlaubi commented on Nov 9, 2026

    @DRSchlaubi
    ContributorAuthor

    Is this something you need for a current or upcoming deployment?

    Yes it is as it is the current backup solution used within my cluster. Every CNPG node uses local path provisioning for its PVC and backups are put into an s3 bucket. My CSI /hetzner cloud) doesn't even support volume snapshots, so having support for barman is currently a major blocker for adopting documentdb

    Contributions are also welcome if you’re interested—we can discuss the approach here first.

    I would be willing to try contributing this, altough I am not all that familiar with working on kubernetes operators. Although I don't think it should be all that complicated as we only need to expose the CNPG API for this and let CNPG do the majority of the work?

  5. WentingWu666666 commented on Nov 10, 2026

    @WentingWu666666
    Collaborator

    @DRSchlaubi Thanks for explaining! That makes sense, especially since snapshots aren’t available in your setup.

    Your understanding is correct: CNPG would handle the backup mechanics. We’d mainly need to expose the configuration and integrate it with our backup and restore flows, with tests.

    We’d welcome a contribution! You’re welcome to discuss ideas here or open a draft PR early so we can work through the details together.

  6. DRSchlaubi commented on Nov 10, 2026

    @DRSchlaubi
    ContributorAuthor

    Off the top of my head-we would need the following changes then:

    • Add barman cloud to the helm chart
    • Add documentdb.plugins
    • Add Backup.method and Backup.pluginConfiguration + ScheduledBackup fields
    • Add the above fields to the cli

    Is there anything i missed?

  7. WentingWu666666 commented on Nov 11, 2026

    @WentingWu666666
    Collaborator

    Off the top of my head-we would need the following changes then:

    • Add barman cloud to the helm chart
    • Add documentdb.plugins
    • Add Backup.method and Backup.pluginConfiguration + ScheduledBackup fields
    • Add the above fields to the cli

    Is there anything i missed?

    Thanks, that looks like a good starting point!

    One API idea: We don’t necessarily need to mirror CNPG’s plugin API directly. One possible DocumentDB API shape, just for reference, could be:

    # DocumentDB
    spec:
      backup:
        barmanCloud:
          objectStoreRef:
            name: my-backups
    
    # Backup / ScheduledBackup
    spec:
      method: barmanCloud  # or volumeSnapshot
    

    The operator could then configure the CNPG plugin internally. This is only a suggestion—I’m open to other approaches if you think they fit better.

  8. DRSchlaubi commented on Nov 11, 2026

    @DRSchlaubi
    ContributorAuthor

    I would prefer the plugin approach:

    1. it's the same as cnpg so it's easier to understand for cnpg users
    2. if someone adds a newer plugin, it's supported directly, since this was the reason why barman was made a plugin to begin with, it would be bad to just give up on this advantage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgo

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions