# PBM 2.6.0 Wrong backup mongodb\_version

**URL:** https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076
**Category:** Percona Backup for MongoDB
**Tags:** new-release, pbm
**Created:** [September 11, 2024, 3:24pm UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076 "2024-09-11T15:24:42Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Vitaliy\_Yablonskiy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vitaliy_yablonskiy/32/17240_2.png) [@Vitaliy\_Yablonskiy](https://forums.percona.com/u/Vitaliy_Yablonskiy)
#### Post date: [September 11, 2024, 3:24pm UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076/1 "2024-09-11T15:24:42Z")

</div>

Hey guys,  
Looks like PBM 2.6.0 stores wrong mongodb\_version in backup metadata and refuses to restore it  
We have pdmdb 7.0.12-7 with FCV 7.0 and PBM 2.6.0:

pbm describe-backup 2024-09-11T13:00:02Z  
name: “2024-09-11T13:00:02Z”  
opid: 66e19453d889f208094ced1b  
type: physical  
last\_write\_time: “2024-09-11T13:00:05Z”  
last\_transition\_time: “2024-09-11T13:15:20Z”  
mongodb\_version: 6.0.16-13  
fcv: “7.0”  
pbm\_version: 2.6.0  
status: done  
size\_h: 101.3 GiB  
…  
As you can see, here we have “mongodb\_version: 6.0.16-13”, and we never had that version.

And the error is:  
Starting restore 2024-09-11T13:55:32.953809398Z from ‘2024-09-11T13:00:02Z’.Error: backup’s Mongo version (6.0.16-13) is not compatible with Mongo 7.0.12-7

We downgraded PBM to 2.5.0 and made a fresh backup:

pbm describe-backup 2024-09-11T14:19:56Z  
name: “2024-09-11T14:19:56Z”  
opid: 66e1a70c504dc024da1f6e6a  
type: physical  
last\_write\_time: “2024-09-11T14:19:59Z”  
last\_transition\_time: “2024-09-11T14:35:03Z”  
mongodb\_version: 7.0.12-7  
fcv: “7.0”  
pbm\_version: 2.5.0  
status: done  
size\_h: 101.3 GiB  
…  
Here we have correct mongodb\_version  
Looks like there is some bug in GetMongoVersion or smth like.

---

<div class="post-metadata">

### Author: ![Sandra\_Romanchenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sandra_romanchenko/32/84_2.png) [@Sandra\_Romanchenko](https://forums.percona.com/u/Sandra_Romanchenko)
#### Post date: [September 11, 2024, 5:22pm UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076/2 "2024-09-11T17:22:53Z")

</div>

Hi,

Can you please provide the following info from your DB?  
`db.runCommand({ buildInfo: 1 })`

---

<div class="post-metadata">

### Author: ![Vitaliy\_Yablonskiy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vitaliy_yablonskiy/32/17240_2.png) [@Vitaliy\_Yablonskiy](https://forums.percona.com/u/Vitaliy_Yablonskiy)
#### Post date: [September 12, 2024, 8:30am UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076/3 "2024-09-12T08:30:37Z")

</div>

Hello.

We have replicaset with 3 members and all of them identical:

test\> db.runCommand({ buildInfo: 1 })  
{  
version: ‘7.0.12-7’,  
psmdbVersion: ‘7.0.12-7’,  
gitVersion: ‘87737e473e09ac7c02486ba75e784bc52ddc45e4’,  
modules: ,  
proFeatures: ,  
allocator: ‘tcmalloc’,  
javascriptEngine: ‘mozjs’,  
sysInfo: ‘deprecated’,  
versionArray: [7, 0, 13, -100],  
openssl: {  
running: ‘OpenSSL 3.0.2 15 Mar 2022’,  
compiled: ‘OpenSSL 3.0.2 15 Mar 2022’  
},  
buildEnvironment: {  
distmod: ‘’,  
distarch: ‘x86\_64’,  
cc: ‘/opt/mongodbtoolchain/v4/bin/gcc: gcc (GCC) 11.3.0’,  
ccflags: ‘-include mongo/platform/basic.h -ffp-contract=off -fasynchronous-unwind-tables -g2 -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -fno-omit-frame-pointer -fno-strict-aliasing -O2 -march=sandybridge -mtune=generic -mprefer-vector-width=128 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -Wno-missing-braces -fstack-protector-strong -gdwarf32 -fdebug-types-section -Wa,–nocompress-debug-sections -fno-builtin-memcmp -Wimplicit-fallthrough=5’,  
cxx: ‘/opt/mongodbtoolchain/v4/bin/g++: g++ (GCC) 11.3.0’,  
cxxflags: ‘-Woverloaded-virtual -Wpessimizing-move -Wno-maybe-uninitialized -fsized-deallocation -Wno-deprecated -std=c++20’,  
linkflags: ‘-Wl,–build-id=sha1 -B/opt/mongodbtoolchain/v4/bin -pthread -Wl,-z,now -fuse-ld=lld -fstack-protector-strong -gdwarf32 -fdebug-types-section -Wl,–build-id=sha1 -Wl,–hash-style=gnu -Wl,-z,noexecstack -Wl,–warn-execstack -Wl,-z,relro -Wl,–compress-debug-sections=none -Wl,-z,origin -Wl,–enable-new-dtags’,  
target\_arch: ‘x86\_64’,  
target\_os: ‘linux’,  
cppdefines: ‘SAFEINT\_USE\_INTRINSICS 0 PCRE2\_STATIC PERCONA\_AUDIT\_ENABLED NDEBUG \_XOPEN\_SOURCE 700 \_GNU\_SOURCE \_FORTIFY\_SOURCE 2 ABSL\_FORCE\_ALIGNED\_ACCESS BOOST\_ENABLE\_ASSERT\_DEBUG\_HANDLER BOOST\_FILESYSTEM\_NO\_CXX20\_ATOMIC\_REF BOOST\_LOG\_NO\_SHORTHAND\_NAMES BOOST\_LOG\_USE\_NATIVE\_SYSLOG BOOST\_LOG\_WITHOUT\_THREAD\_ATTR BOOST\_MATH\_NO\_LONG\_DOUBLE\_MATH\_FUNCTIONS BOOST\_SYSTEM\_NO\_DEPRECATED BOOST\_THREAD\_USES\_DATETIME BOOST\_THREAD\_VERSION 5’  
},  
bits: 64,  
debug: false,  
maxBsonObjectSize: 16777216,  
storageEngines: [‘devnull’, ‘inMemory’, ‘wiredTiger’],  
ok: 1,  
‘$clusterTime’: {  
clusterTime: Timestamp({ t: 1726129770, i: 3 }),  
signature: {  
hash: Binary.createFromBase64(‘KItv1/IvWxxhwAd2erYQF6aV6ZQ=’, 0),  
keyId: Long(‘7356931927510614018’)  
}  
},  
operationTime: Timestamp({ t: 1726129770, i: 3 })  
}

---

<div class="post-metadata">

### Author: ![Sandra\_Romanchenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sandra_romanchenko/32/84_2.png) [@Sandra\_Romanchenko](https://forums.percona.com/u/Sandra_Romanchenko)
#### Post date: [September 12, 2024, 10:54am UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076/4 "2024-09-12T10:54:37Z")

</div>

It’s not possible to reproduce the issue on our side, it works OK with PSMDB 7.0.12 and PBM 2.6.0.

```auto
mongodb_version: 7.0.12-7
fcv: "7.0"
pbm_version: 2.6.0

```

Also PBM can’t get some random PSMDB version unless it’s set inside database, so can you please provide the result of this output?

```auto
rs.status().members.forEach(function (member) {
    print(`[${member._id}]: ${member.name}`);
    
    if (member.self) {
        var buildInfo = db.serverBuildInfo();
        printjson({ psmdbVersion: buildInfo.psmdbVersion || "N/A", version: buildInfo.version || "N/A" });
    } else {
        try {
            var mdb = new Mongo(member.name + "/admin");
            var adminDB = mdb.getDB('admin');
            
            // !!!!!! Use your DBA user and password here !!!!!!
            var authResult = adminDB.auth('USER', 'PASSWORD');
            if (authResult) {
                var buildInfo = adminDB.runCommand({ buildInfo: 1 });
                if (buildInfo.ok) {
                    printjson({
                        psmdbVersion: buildInfo.psmdbVersion || "N/A",
                        version: buildInfo.version || "N/A"
                    });
                } else {
                    print("Failed to get build info: " + JSON.stringify(buildInfo));
                }
            } else {
                print("Authentication failed for node: " + member.name);
            }
        } catch (error) {
            print("Failed to connect or execute command on node: " + member.name + " - " + JSON.stringify(error));
        }
    }
    
    print("");
});

```

The output should like below:

```auto
[1]: testdb:27017
{
  psmdbVersion: '7.0.12-7',
  version: '7.0.12-7'
}

[2]: testdb:27018
{
  psmdbVersion: '7.0.12-7',
  version: '7.0.12-7'
}

[3]: testdb:27019
{
  psmdbVersion: '7.0.12-7',
  version: '7.0.12-7'
}

```

In addition, can you please inform in what way PSMDB was installed (from which repo or tarball or custom build)? Thanks.

---

<div class="post-metadata">

### Author: ![Vitaliy\_Yablonskiy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vitaliy_yablonskiy/32/17240_2.png) [@Vitaliy\_Yablonskiy](https://forums.percona.com/u/Vitaliy_Yablonskiy)
#### Post date: [September 12, 2024, 11:07am UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076/5 "2024-09-12T11:07:09Z")

</div>

Installed package is  
`https://repo.percona.com/pdmdb-7.0.12/apt/pool/main/p/percona-server-mongodb/percona-server-mongodb_7.0.12-7.jammy_amd64.deb`

Output:

```auto
[16]: (redacted):27018
{
  psmdbVersion: '7.0.12-7',
  version: '7.0.12-7'
}

[17]: (redacted):27018
{
  psmdbVersion: '7.0.12-7',
  version: '7.0.12-7'
}

[18]: (redacted):27018
{
  psmdbVersion: '7.0.12-7',
  version: '7.0.12-7'
}

```

Well if it can’t be reproduced, we’ll keep digging from our side. Maybe will wait for 2.6.1

Thank you anyway.

---

<div class="post-metadata">

### Author: ![Sandra\_Romanchenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sandra_romanchenko/32/84_2.png) [@Sandra\_Romanchenko](https://forums.percona.com/u/Sandra_Romanchenko)
#### Post date: [September 12, 2024, 12:02pm UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076/6 "2024-09-12T12:02:57Z")

</div>

Unfortunately, newer PBM version won’t bring any changes unless the issue is rectified.

Each backup on storage has metadata in json format, for instance, for backup 2024-09-12T05:59:08Z the filename would be 2024-09-12T05\_59\_08Z.pbm.json. It holds MongoDB and PBM versions for each node inside RS when backup was created, as well as node name, can you please download this file and provide us versions saved during backup and also ensure that this backup was taken from the same RS as one in question (node name match)?

F.e.

```auto
grep -B1 mongo_version 2024-09-12T05_59_08Z.pbm.json 
			"pbm_version": "2.6.0",
			"mongo_version": "7.0.12-7"
--
			"pbm_version": "2.6.0",
			"mongo_version": "7.0.12-7"
--
			"pbm_version": "2.6.0",
			"mongo_version": "7.0.12-7"

```

---

<div class="post-metadata">

### Author: ![Vitaliy\_Yablonskiy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vitaliy_yablonskiy/32/17240_2.png) [@Vitaliy\_Yablonskiy](https://forums.percona.com/u/Vitaliy_Yablonskiy)
#### Post date: [September 12, 2024, 12:15pm UTC](https://forums.percona.com/t/pbm-2-6-0-wrong-backup-mongodb-version/33076/7 "2024-09-12T12:15:39Z")

</div>

This is the particular backup I was asking about:

```auto
grep -B1 mongo_version 2024-09-11T13_00_02Z.pbm.json
			"pbm_version": "2.6.0",
			"mongo_version": "6.0.16-13"

```

But this time I additionally checked backup from the day before aaand:

```auto
grep -B1 mongo_version 2024-09-10T13_00_02Z.pbm.json
			"pbm_version": "2.6.0",
			"mongo_version": "7.0.12-7"

```

pdbdm and pbm version haven’t changed from 9.10 to 9.11 and yet we have two different mongo\_versions.  
Very strange. Some kind of anomaly.  
Let’s close this thread for now, we need more info. I’ll come back if it’s still an issue.

Thank you for your time!
