PBM small backup size

Hi
My mongodb sharded installation has a data volume of 20+ GB on each shard. When I start Percone Backup Mongodb backup, the backup size in storage Minio is 71MB after backup finished. Why backup size is too small?

Cluster:
========
shard_1:
  - shard_1/shardsvr-mongodb.mongodb-db-4.example.com:27018 [S]: pbm-agent v2.3.0 OK
  - shard_1/shardsvr-mongodb.mongodb-db-5.example.com:27018 [S]: pbm-agent v2.3.0 OK
  - shard_1/shardsvr-mongodb.mongodb-db-6.example.com:27018 [P]: pbm-agent v2.3.0 OK
shard_2:
  - shard_2/shardsvr-mongodb.mongodb-db-7.example.com:27018 [S]: pbm-agent v2.3.0 OK
  - shard_2/shardsvr-mongodb.mongodb-db-8.example.com:27018 [S]: pbm-agent v2.3.0 OK
  - shard_2/shardsvr-mongodb.mongodb-db-9.example.com:27018 [P]: pbm-agent v2.3.0 OK
replTest:
  - mongodb/configsvr-mongodb.mongodb-db-1.example.com:27019 [S]: pbm-agent v2.3.0 OK
  - mongodb/configsvr-mongodb.mongodb-db-2.example.com:27019 [P]: pbm-agent v2.3.0 OK
  - mongodb/configsvr-mongodb.mongodb-db-3.example.com:27019 [S]: pbm-agent v2.3.0 OK


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

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

Backups:
========
S3 us-east-1 s3://http://mongodb-storage-1.example.com:9000/mongodbbackup/backups
  Snapshots:
    2023-10-17T13:27:19Z 71.21MB <logical> [restore_to_time: 2023-10-17T13:27:26Z]
pitr:
  enabled: false
  oplogSpanMin: 0
  compression: gzip
  compressionLevel: 3
storage:
  type: s3
  s3:
    provider: aws
    region: us-east-1
    endpointUrl: http://mongodb-storage-1.example.com:9000
    forcePathStyle: true
    bucket: mongodbbackup
    prefix: backups
    credentials:
      access-key-id: '***'
      secret-access-key: '***'
    uploadPartSize: 5
    maxUploadParts: 10000
    storageClass: STANDARD
    insecureSkipTLSVerify: false
    retryer:
      numMaxRetries: 2
      minRetryDelay: 5ns
      maxRetryDelay: 5ns
restore:
  batchSize: 500
  numInsertionWorkers: 5
backup:
  timeouts:
    startingStatus: 60
  compression: gzip
  compressionLevel: 3

Mongodb, pbm agent all in docker containers

Hi @AlexSmith ,

Welcome to the Percona community !!

When we are taking backups using PBM, by default the it uses s2 compression algorithm. From the above mentioned yaml file, you are using gzip compression algorithm with level 3 which provides higher compression than s2.

Compression method Supported compression levels Default
zstd 1 - fastest speed, 2 - default, 3 - better compression, 4 - best compression 2
snappy no levels
lz4 From 1 (fastest) to 16 1
gzip and pgzip -1 - default compression, 0 - no compression, 1 - best speed, 9 - best compression -1

Kindly check the documentation for various compression algorithm.

Also just confirm that the backup is successfully completed, you can check pbm logs where it states backup finished.

Regards,
Parag