Backups with pbm-agent 2.8.0 can't restore text indices

After upgrading to percona/percona-backup-mongodb:2.8.0 we were no longer able to restore any backups, as they always fail to restore an arbitrary text-index.

E.g.

2025-01-15T09:29:05.000+0000 E [restore/2025-01-15T09:28:20.337518414Z] restore: restore indexes: createIndexes for <index>.<collection>: (CannotCreateIndex) Error in specification { key: { _fts: "text", _ftsx: 1 }, name: "name_text", v: 2 } :: caused by :: text index option 'weights' must specify fields or the wildcard

The index definition from the source database is

​ {
  v: 2,
  key: {
    _fts: 'text', 
    _ftsx: 1 
  },
  name: 'name_text',
  background: true,
  weights: {
     name: 1 
  },
  default_language: 'english',
  language_override: 'language',
  textIndexVersion: 3
}

so weights should fit the criteria criticized in the error.

We tried multiple combinations of version for both restore and backup agent.

Backup Agent Version Restore Agent Version Restore outcome
2.8.0 2.8.0 :x:
2.8.0 2.6.0 :x:
2.6.0 2.8.0 :white_check_mark:
2.6.0 2.6.0 :white_check_mark:
2.7.0 2.7.0 :white_check_mark:
2.7.0 2.8.0 :white_check_mark:

Any help is appreciated.

Thanks @Michael_Schmid - I guess this is related to the lack of proper handling indexes (storing) withing the backup. Also mentioned here for the other index - PBM restore failure -- missing required partialFilterExpression on the creates

Might be related to changing our implementation from mongodump to our own. We’ll try to fix it withing next version in 2.9.0. For that time I suggest to use 2.6.0 verison.

Related bug for failure with partialFilterExpressions: PBM-1479

Can you downgrade an installation of pbm to 2.6.0 or does that invalidate existing data in the destination storage area?

You can. Depending on the compatibility you may need to create a new backup before.