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

**URL:** <https://forums.percona.com/t/backups-with-pbm-agent-2-8-0-cant-restore-text-indices/36259>\
**Category:** Percona Backup for MongoDB\
**Tags:** pbm\
**Created:** [January 21, 2025, 3:00pm UTC](https://forums.percona.com/t/backups-with-pbm-agent-2-8-0-cant-restore-text-indices/36259 "2025-01-21T15:00:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Schmid](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_schmid/32/17915_2.png) [@Michael\_Schmid](https://forums.percona.com/u/Michael_Schmid)\
**Post date:** [January 21, 2025, 3:00pm UTC](https://forums.percona.com/t/backups-with-pbm-agent-2-8-0-cant-restore-text-indices/36259/1 "2025-01-21T15:00:21Z")

</div>

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.

```auto
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

```auto
​ {
  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 | ❌ |
| 2.8.0 | 2.6.0 | ❌ |
| 2.6.0 | 2.8.0 | ✅ |
| 2.6.0 | 2.6.0 | ✅ |
| 2.7.0 | 2.7.0 | ✅ |
| 2.7.0 | 2.8.0 | ✅ |

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![radoslaw.szulgo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/radoslaw.szulgo/32/17315_2.png) [@radoslaw.szulgo](https://forums.percona.com/u/radoslaw.szulgo)\
**Post date:** [January 21, 2025, 3:06pm UTC](https://forums.percona.com/t/backups-with-pbm-agent-2-8-0-cant-restore-text-indices/36259/2 "2025-01-21T15:06:02Z")

</div>

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](https://forums.percona.com/t/pbm-restore-failure-missing-required-partialfilterexpression-on-the-creates/36209)

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.

---

<div class="post-metadata">

**Author:** ![Nathan\_Neulinger](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nathan_neulinger/32/176_2.png) [@Nathan\_Neulinger](https://forums.percona.com/u/Nathan_Neulinger)\
**Post date:** [January 21, 2025, 3:10pm UTC](https://forums.percona.com/t/backups-with-pbm-agent-2-8-0-cant-restore-text-indices/36259/3 "2025-01-21T15:10:21Z")

</div>

Related bug for failure with partialFilterExpressions: [PBM-1479](https://perconadev.atlassian.net/browse/PBM-1479)

---

<div class="post-metadata">

**Author:** ![Nathan\_Neulinger](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nathan_neulinger/32/176_2.png) [@Nathan\_Neulinger](https://forums.percona.com/u/Nathan_Neulinger)\
**Post date:** [January 21, 2025, 3:11pm UTC](https://forums.percona.com/t/backups-with-pbm-agent-2-8-0-cant-restore-text-indices/36259/4 "2025-01-21T15:11:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![radoslaw.szulgo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/radoslaw.szulgo/32/17315_2.png) [@radoslaw.szulgo](https://forums.percona.com/u/radoslaw.szulgo)\
**Post date:** [January 21, 2025, 3:13pm UTC](https://forums.percona.com/t/backups-with-pbm-agent-2-8-0-cant-restore-text-indices/36259/5 "2025-01-21T15:13:17Z")

</div>

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