Not clear if PBM does incremental backups when `pitr.enabled` is set to true

I am evaluating PBM as a backup solution to our Percona MongoDB replicaset clusters.

My PBM configuration is as follows:

pitr:
  enabled: true
  oplogSpanMin: 0
  compression: s2
storage:
  type: s3
  s3:
    provider: aws
    region: <aws-region>
    bucket: <mongodb-backups-bucket>
    prefix: king-crimson
    credentials:
      access-key-id: '***'
      secret-access-key: '***'
    maxUploadParts: 10000
    storageClass: STANDARD
    insecureSkipTLSVerify: false

after enabling PITR and executing backups, I see that backups are not incremental, but full:

<user>@<my-replicaset>-03:~$ PBM_MONGODB_URI='mongodb://pbmuser:<pbm-user-password>@<my-replicaset>-01.<my-domain>:27017,<my-replicaset>-02.<my-domain>:27017,<my-replicaset>-03.<my-domain>:27017' pbm status
Cluster:
========
<my-replicaset>:
  - <my-replicaset>/<my-replicaset>-03.<my-domain>:27017: pbm-agent v1.8.1 OK
  - <my-replicaset>/<my-replicaset>-02.<my-domain>:27017: pbm-agent v1.8.1 OK
  - <my-replicaset>/<my-replicaset>-01.<my-domain>:27017: pbm-agent v1.8.1 OK


PITR incremental backup:
========================
Status [ON]

Currently running:
==================
(none)

Backups:
========
S3 <aws-region> s3://<mongodb-backups-bucket>/<my-replicaset>
  Snapshots:
    2022-09-19T16:11:51Z 194.74GB <logical> [complete: 2022-09-19T17:56:49Z]
    2022-09-19T14:21:04Z 194.75GB <logical> [complete: 2022-09-19T16:08:02Z]
    2022-09-19T06:15:14Z 194.74GB <logical> [complete: 2022-09-19T08:06:18Z]
  PITR chunks [12.64MB]:
    2022-09-19T08:06:19Z - 2022-09-20T06:07:01Z

PBM’s documentation on backup types indicates that there is support for incremental backups. However, I don’t see options related to setting up incremental backups within pbm config

I have two questions in this context:

  1. How do i enable incremental backups?
  2. If I disable PITR, take a full backup, and then enable PITR, add some data, and then take a backup again, will that enable incremental backups?
1 Like

Hi @Prashant_Warrier,

You have enabled PITR already.

pitr:
  enabled: true
  oplogSpanMin: 0
  compression: s2

This is PITR config part. PITR is enabled. Internal defaults to every 10 min with compression S2.

pbm status shows that PITR is enabled:

PITR incremental backup:
========================
Status [ON]

and some chunks are already saved:

Backups:
========
[...]
  PITR chunks [12.64MB]:
    2022-09-19T08:06:19Z - 2022-09-20T06:07:01Z

To have PITR set up properly, you need to enable it and then make a full backup. PITR will take that full backup as the base and apply changes over it using the oplog chunks.

Please take a look at PBM docs:

2 Likes