Pbm restore failed, and says missing collection

pbm 2.1.0
when restore get the following error, but when I check, the collection config.image_collection is exists.
Any one know the reason?
Or PBM support to exclude it when restore

Waiting to finish.................Error: operation failed with: replay chunk 1684373477.1684373857: apply oplog for chunk: applying an entry: op: {"Timestamp":{"T":1684373543,"I":109},"Term":4,"Hash":null,"Version":2,"Operation":"d","Namespace":"config.image_collection","Object":[{"Key":"_id","Value":[{"Key":"id","Value":{"Subtype":4,"Data":"bHYvIV15QB+4gqO7B8eWbg=="}},{"Key":"uid","Value":{"Subtype":0,"Data":"UeumqUwdLsJc+cN3Ttbz8oP13P7COat20SkZAY40CyY="}}]}],"Query":null,"UI":{"Subtype":4,"Data":"VEtKAE2XTIOppg3OV3IiOw=="},"LSID":null,"TxnNumber":null,"PrevOpTime":null} | merr <nil>: applyOps: (NamespaceNotFound) Failed to apply operation due to missing collection (544b4a00-4d97-4c83-a9a6-0dce5772223b): { ts: Timestamp(1684373543, 109), t: 4, h: null, v: 2, op: "d", ns: "config.image_collection", o: { _id: { id: UUID("6c762f21-5d79-401f-b882-a3bb07c7966e"), uid: BinData(0, 51EBA6A94C1D2EC25CF9C3774ED6F3F283F5DCFEC239AB76D12919018E340B26) } }, ui: UUID("544b4a00-4d97-4c83-a9a6-0dce5772223b"), wall: new Date(0) }

Hi @Max_Chen ,

What is the MongoDB version? Is it full logical restore?

Even if there is image_collection collection, it may not be the same. MongoDB uses somewhere namespace and somewhere UUID to identify a collection.

Could you please check UUID of the collection?

go to the mongod node and run db.getSiblingDB('config').getCollectionInfos({name:'image_collection'})

@Dmytro_Zghoba

MongoDB server version: 6.0.3

rs0:PRIMARY> db.getSiblingDB('config').getCollectionInfos({name:'image_collection'})
[
	{
		"name" : "image_collection",
		"type" : "collection",
		"options" : {
			
		},
		"info" : {
			"readOnly" : false,
			"uuid" : UUID("1048e175-fc9e-45df-ab84-8f5f1a77efec")
		},
		"idIndex" : {
			"v" : 2,
			"key" : {
				"_id" : 1
			},
			"name" : "_id_"
		}
	}
]

the error contains UUID("544b4a00-4d97-4c83-a9a6-0dce5772223b"). But on the node, the collection has UUID("1048e175-fc9e-45df-ab84-8f5f1a77efec").

Could you please create a ticket in Percona JIRA?

just for now: the Op (db.image_collection.deleteOne({ ... })) has failed. It is part of the applyOps command, which uses UUID. During restore, the collection is dropped and created with a different UUID.

No way to exclude the collection like --exclude="config.image_collection". But you can try to run Selective Restore where you can specify comma separated list of dbs/collections to restore.

https://jira.percona.com/browse/PBM-1123

Does it mean the cluster restore is failing or it is safe to ignore this error until it is fixed?

Thanks.

hi @sohahm,

in short, if pbm status shows failed to restore then the cluster is in an inconsistency state - failed.