Percona Mongo Backup Failed : .Error: get backup files: Unrecognized pipeline stage name: '$backupCursor'

Hey Team,

I am trying to take backup on MongoDB (From Installed MongoDB Corporation) using Percona Backup Mongodb. Below are few details :

MongoDB Version :
mongodb-database-tools/focal,focal,now 100.6.1 amd64 [installed,automatic]
mongodb-org-database-tools-extra/focal,now 6.0.3 amd64 [installed,automatic]
mongodb-org-server/focal,now 5.0.14 amd64 [installed,upgradable to: 6.0.3]
mongodb-org-shell/focal,now 5.0.14 amd64 [installed,upgradable to: 6.0.3]
mongodb-org-tools/focal,now 6.0.3 amd64 [installed]

Percona Backup MongoDB :
percona-backup-mongodb/stable,now 2.0.2-1.focal amd64 [installed]

Well, I have creating Instance as a Primary node on replica set and below are commands used for taking backup.

pbm-agent --mongodb-uri="mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin&replSetName=rs_jyoti"

pbm config --file /etc/pbm_config.yaml
pbm backup --type=physical --mongodb-uri="mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin&replicaSet=rs_jyoti"

Error :

 pbm backup --type=physical --mongodb-uri="mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin&replicaSet=rs_jyoti"
Starting backup '2022-12-27T11:02:05Z'...Error: get backup files: create backupCursor: (Location40324) Unrecognized pipeline stage name: '$backupCursor'
2022-12-27T12:01:45.000+0100 I starting PITR routine
2022-12-27T12:01:45.000+0100 I node: rs_jyoti/10.130.0.113:27017
2022-12-27T12:01:45.000+0100 I listening for the commands
2022-12-27T12:02:06.000+0100 I got command backup [name: 2022-12-27T11:02:05Z, compression: s2 (level: default)] <ts: 1672138925>
2022-12-27T12:02:06.000+0100 I got epoch {1672138915 1}
2022-12-27T12:02:06.000+0100 D [backup/2022-12-27T11:02:05Z] init backup meta
2022-12-27T12:02:06.000+0100 D [backup/2022-12-27T11:02:05Z] nomination list for rs_jyoti: [[10.130.0.113:27017]]
2022-12-27T12:02:06.000+0100 D [backup/2022-12-27T11:02:05Z] nomination rs_jyoti, set candidates [10.130.0.113:27017]
2022-12-27T12:02:07.000+0100 I [backup/2022-12-27T11:02:05Z] backup started
2022-12-27T12:02:08.000+0100 I [backup/2022-12-27T11:02:05Z] mark RS as error `get backup files: create backupCursor: (Location40324) Unrecognized pipeline stage name: '$backupCursor'`: <nil>
2022-12-27T12:02:08.000+0100 I [backup/2022-12-27T11:02:05Z] mark backup as error `get backup files: create backupCursor: (Location40324) Unrecognized pipeline stage name: '$backupCursor'`: <nil>
2022-12-27T12:02:08.000+0100 E [backup/2022-12-27T11:02:05Z] backup: get backup files: create backupCursor: (Location40324) Unrecognized pipeline stage name: '$backupCursor'
2022-12-27T12:02:08.000+0100 D [backup/2022-12-27T11:02:05Z] releasing lock```

Please help, what step I am doing wrong ? 
Thank you in advance.
1 Like

Hey Jyoti,
The Physical backup of PBM relies on the $backupCursor available on Percona Server for MongoDB. You can find more details here - https://www.percona.com/blog/2021/06/07/experimental-feature-backupcursorextend-in-percona-server-for-mongodb/. So you will need to try the physical backup with PSMDB. The error you got was related to that:

Starting backup '2022-12-27T11:02:05Z'...Error: get backup files: create backupCursor: (Location40324) Unrecognized pipeline stage name: '$backupCursor'

Physical backups and restores are available for Percona Server for MongoDB starting from versions 4.2.15-16, 4.4.6-8, 5.0 and higher. Please check the physical backup with the proper PSMDB version and let us know.

Regards,
Vinodh Krish

1 Like