Skip to content

feat(backups): add a native MongoDB (psmdb) backup-strategy driver #3545

Description

@IvanHunters

Summary

The backup-strategy framework (backups.cozystack.io + strategy.backups.cozystack.io)
ships native drivers for Postgres (CNPG), MariaDB (MariaDB), ClickHouse
(Altinity), Etcd (Etcd), FoundationDB (FoundationDB), plus the generic
Velero and Job strategies. MongoDB has no native driver, even though
cozystack ships the Percona psmdb operator, which provides its own
PerconaServerMongoDBBackup / PerconaServerMongoDBRestore CRDs.

As a result a managed MongoDB app can only be backed up either:

  • via the Velero strategy — a crash-consistent PVC snapshot at the app level; or
  • via a hand-written generic Job strategy running mongodump.

There is no logical, engine-native backup through the unified
BackupJob / RestoreJob API, and therefore no PITR and no
restore-into-a-differently-named instance (both of which the native DB drivers
like CNPG provide).

Current state

  • No mongodbs.strategy.backups.cozystack.io kind. The BackupJob / RestoreJob
    dispatch handles only Job, Velero, CNPG, Altinity, MariaDB,
    FoundationDB, Etcd.
  • cozy-default BackupClass has no MongoDB mapping.
  • The shipped psmdb operator already exposes
    PerconaServerMongoDBBackup / PerconaServerMongoDBRestore, which a driver
    could orchestrate — analogous to the CNPG driver wrapping
    cnpg.io/Backup, MariaDB wrapping the mariadb-operator, and Altinity
    wrapping clickhouse-backup.

Why it matters

MongoDB is offered as a managed application, but its backup story is
inconsistent with the other managed databases: users get only crash-consistent
PVC snapshots or must build and maintain their own mongodump Job strategy.
There is no declarative, engine-native path and no point-in-time / cross-instance
restore.

Proposal

  • Add a MongoDB backup-strategy driver (e.g. kind MongoDB under
    strategy.backups.cozystack.io) that drives the psmdb operator's
    PerconaServerMongoDBBackup / PerconaServerMongoDBRestore.
  • Wire it into the BackupJob / RestoreJob dispatch and the supported-kinds
    list.
  • Add a Postgres-style MongoDB mapping to the cozy-default BackupClass.

Activity

  1. pranav767 commented on Aug 5, 2026

    @pranav767

    I'd love to work on this ✋

  2. added 2 commits that reference this issue on Aug 11, 2026
    7264d5c
    dff56aa
  3. added a commit that references this issue on Aug 13, 2026
    09dc7f4
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

    triage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions