# Incremental backup support for Percona MongoDB operator for kubernetes

**URL:** <https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085>\
**Category:** Percona Operator for MongoDB\
**Created:** [September 8, 2021, 8:57am UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085 "2021-09-08T08:57:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![siva](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@siva](https://forums.percona.com/u/siva)\
**Post date:** [September 8, 2021, 8:57am UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/1 "2021-09-08T08:57:49Z")

</div>

Hi,

At present, it looks like the PSMDB operator for Kubernetes offers only full backup support.  
It takes several Megabytes of S3 storage to maintain multiple backups for a longer period of time.  
Is there any plan to provide incremental backup support in any of the upcoming releases?

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [September 9, 2021, 6:36pm UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/2 "2021-09-09T18:36:22Z")

</div>

Hello @siva ,

the problem you are trying to solve is the storage consumption, right?  
Our Operator also supports point-in-time recovery - uploading oplogs to S3. Do you think it helps?

---

<div class="post-metadata">

**Author:** ![Semantic](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/semantic/32/9104_2.png) [@Semantic](https://forums.percona.com/u/Semantic)\
**Post date:** [January 25, 2023, 6:25pm UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/3 "2023-01-25T18:25:15Z")

</div>

Hello again @Sergey_Pronin! At risk of unearthing an old conversation, I thought it would be better to comment here rather than create a duplicate topic.

I could not find anything in the operator docs referring to incremental backups, so I’m assuming only full and PITR backups are supported currently.

Our use-case involves a big cluster (let’s say 1TB for simplicity’s sake) which grows a few GB every day. Doing one full backup and then enabling PITR is not ideal as the recovery time would be way too long, and creating full backups every N days would be expensive (mostly in terms of bandwidth, storage cost isn’t that much of an issue) so incrementals seem like a good way to go about it.

From my understanding, incremental backups are considered a _Technical preview feature_, but as they’ve been around for a couple years now, I was wondering if there’s anything blocking their implementation into the Mongo Operator.

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [January 26, 2023, 12:03pm UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/4 "2023-01-26T12:03:31Z")

</div>

Hello @Semantic ,

no problem with unearthing 🙂  
Operator does not have incremental backups yet.

We use Percona Backup for MongoDB (PBM) in the Operator and it added incremental backups only just now for physical: [Incremental physical backups - Percona Backup for MongoDB](https://docs.percona.com/percona-backup-mongodb/usage/incremental-backup.html)

We don’t have logical incremental backups, just PITR (oplogs).

We will add physical backups in the next release of the operator. Will see if we can add incremental in the same go.

---

<div class="post-metadata">

**Author:** ![Semantic](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/semantic/32/9104_2.png) [@Semantic](https://forums.percona.com/u/Semantic)\
**Post date:** [January 26, 2023, 3:56pm UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/5 "2023-01-26T15:56:33Z")

</div>

@Sergey_Pronin Ah, my apologies. I assumed that the OP mentioning incremental backups meant they were already out there when he posted about it, but `2.0.3` was indeed created 2 weeks ago.

Let me know if there’s anything I can help with to have it make it to the operator release! I’ll definitely be happy to try it out and report my findings.

I think [K8SPSMDB-713](https://jira.percona.com/projects/K8SPSMDB/issues/K8SPSMDB-713) might actually be related since it adds support for physical backups to the operator, although does not seem to touch on incrementals, as it was opened last July.

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [January 27, 2023, 8:31am UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/6 "2023-01-27T08:31:30Z")

</div>

@Semantic we have this huge pull request for physical backups and restores: [https://github.com/percona/percona-server-mongodb-operator/pull/1112](https://github.com/percona/percona-server-mongodb-operator/pull/1112)

You can check if it would be easy to add incremental backups. What do you think?

---

<div class="post-metadata">

**Author:** ![Semantic](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/semantic/32/9104_2.png) [@Semantic](https://forums.percona.com/u/Semantic)\
**Post date:** [January 27, 2023, 4:01pm UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/7 "2023-01-27T16:01:31Z")

</div>

Not sure if this is sarcasm, but yes I know, that PR is related to [K8SPSMDB-713](https://jira.percona.com/projects/K8SPSMDB/issues/K8SPSMDB-713) I linked above.

Given Ege already added the `backupType` option, the thing missing is supporting passing the `--base` param required when creating the first incremental backup which acts exactly the same as a full physical backup. Since _pbm_ should handle creating the incremental based on what changed, I’m assuming adding a backup task entry to run the incremental on a schedule should work as expected.

I’m sure there might be some other considerations like writing the unit tests for it, but from it doesn’t seem that extreme of an add.

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [January 27, 2023, 4:30pm UTC](https://forums.percona.com/t/incremental-backup-support-for-percona-mongodb-operator-for-kubernetes/12085/8 "2023-01-27T16:30:02Z")

</div>

No sarcasm at all, I was not sure if you saw the PR 🙂

I will ask Ege about it and see. Thanks for pushing it forward!
