# Restore on replicaset "rs1" in state: error: check mongod binary: run: exec: "mongod": executable file not found in $PATH. stderr:

**URL:** <https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064>\
**Category:** Percona Everest\
**Created:** [November 15, 2024, 11:46am UTC](https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064 "2024-11-15T11:46:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayaprakash\_Duraisam](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jayaprakash_duraisam/32/18251_2.png) [@Jayaprakash\_Duraisam](https://forums.percona.com/u/Jayaprakash_Duraisam)\
**Post date:** [November 15, 2024, 11:46am UTC](https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064/1 "2024-11-15T11:46:22Z")

</div>

Hi Team,

I’m doing POC for the pbm backup & restore scenarios. I’ve 2 node replicaset and the following is the configuration details,

[root@05d7fd5bde83 ~]# mongo --version  
Percona Server for MongoDB shell version v4.4.18-18  
Build Info: {  
“version”: “4.4.18-18”,  
“gitVersion”: “436de76a8593f0207ba7352ca56ee5f5c52b0bb7”,  
“openSSLVersion”: “OpenSSL 1.1.1k FIPS 25 Mar 2021”,  
“modules”: ,  
“allocator”: “tcmalloc”,  
“environment”: {  
“distarch”: “x86\_64”,  
“target\_arch”: “x86\_64”  
}  
}  
[root@05d7fd5bde83 ~]# pbm version  
Version: 2.3.0  
Platform: linux/amd64  
GitCommit: 3b1c2e263901cf041c6b83547f6f28ac2879911f  
GitBranch: release-2.3.0  
BuildTime: 2023-09-20\_14:42\_UTC  
GoVersion: go1.19  
[root@05d7fd5bde83 ~]#

Trying to restore the backup and getting below given error,

[root@mongodb-test6 ~]# pbm restore --time “2024-11-15T09:31:07”  
Starting restore 2024-11-15T11:39:38.359619899Z to point-in-time 2024-11-15T09:31:07 from ‘2024-11-14T09:44:16Z’…Error: check mongod binary: run: exec: “mongod”: executable file not found in $PATH. stderr:

- Restore on replicaset “rs1” in state: error: check mongod binary: run: exec: “mongod”: executable file not found in $PATH. stderr:  
[root@mongodb-test6 ~]#

Kindly assist me on this.

regards,  
Jayaprakash Duraisamy

---

<div class="post-metadata">

**Author:** ![Jayaprakash\_Duraisam](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jayaprakash_duraisam/32/18251_2.png) [@Jayaprakash\_Duraisam](https://forums.percona.com/u/Jayaprakash_Duraisam)\
**Post date:** [November 15, 2024, 12:21pm UTC](https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064/2 "2024-11-15T12:21:14Z")

</div>

And this is the output of pbm status and trying to restore in the same instance.

# [root@mongodb-test6 ~]# pbm status Cluster:

rs1:

- rs1/192.168.40.116:27017 [S]: pbm-agent v2.3.0 OK
- rs1/192.168.40.124:27017 [P]: pbm-agent v2.3.0 OK

# PITR incremental backup:

Status [ON]

# Currently running:

(none)

# Backups:

S3 us-west-1 s3://rdscreation-111023-jp/instance3  
Snapshots:  
2024-11-15T09:37:11Z 6.70MB [restore\_to\_time: 2024-11-15T09:37:12Z]  
2024-11-15T09:31:07Z 16.67MB \<incremental, base\> [restore\_to\_time: 2024-11-15T09:31:09Z]  
2024-11-15T07:39:41Z 0.00B \<incremental, base\> [ERROR: upload file `/data/db/collection-51--5216000798853528115.wt`: get file stat: stat /data/db/collection-51–5216000798853528115.wt: no such file or directory] [2024-11-15T07:39:46Z]  
2024-11-14T09:44:16Z 1.49MB [restore\_to\_time: 2024-11-14T09:44:17Z]  
2024-11-14T09:37:51Z 1.45MB \<incremental, base\> [restore\_to\_time: 2024-11-14T09:37:53Z]  
2024-11-14T09:36:41Z 39.08KB [restore\_to\_time: 2024-11-14T09:36:46Z]  
PITR chunks [47.51MB]:  
2024-11-14T09:36:47Z - 2024-11-15T12:09:39Z  
2024-11-14T09:09:45Z - 2024-11-14T09:36:46Z (no base snapshot)  
2024-11-14T07:09:32Z - 2024-11-14T07:44:13Z (no base snapshot)  
[root@mongodb-test6 ~]#

---

<div class="post-metadata">

**Author:** ![arlindo.neto](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/arlindo.neto/32/6930_2.png) [@arlindo.neto](https://forums.percona.com/u/arlindo.neto)\
**Post date:** [November 18, 2024, 12:49pm UTC](https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064/3 "2024-11-18T12:49:18Z")

</div>

Hi [Jayaprakash\_Duraisam](https://forums.percona.com/u/Jayaprakash_Duraisam), we hope you are doing great.

I see that you are running pbm 2.4 and psmdb 4.4.

Please Use PBM 2.6 and psmdb 6 for better support from you developers. MongoDB 5.0 was deprecated October 2024 (last month).

Secondly, your error message suggests that PBM could not find PSMDB dependency package which provides **mongod binary.** Could you please confirm if server mongodb-test6 has mongod binary available? PBM uses that for stopping and stratning mongod processes througout the restore process.

cheers.

---

<div class="post-metadata">

**Author:** ![Jayaprakash\_Duraisam](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jayaprakash_duraisam/32/18251_2.png) [@Jayaprakash\_Duraisam](https://forums.percona.com/u/Jayaprakash_Duraisam)\
**Post date:** [November 18, 2024, 12:57pm UTC](https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064/4 "2024-11-18T12:57:23Z")

</div>

Hi Arlindo.neto,

Thanks for providing me the updates. Let me try using the pbm 2.6 and psmdb 6 and keep you posted on this.

For the mongod binariy, this is the output,

# CONTAINER

[root@05d7fd5bde83 ~]#  
[root@05d7fd5bde83 ~]# ls -lrt /usr/bin/mongod  
-rwxr-xr-x. 1 root root 71514432 Dec 15 2022 /usr/bin/mongod  
[root@05d7fd5bde83 ~]#  
[root@05d7fd5bde83 ~]# exit  
exit

# HOST MACHINE

[root@mongodb-test6 ~]# find / -name mongod  
/var/lib/docker/overlay2/944ad8776e1c4e043206b359787ed530eb398fb6bb71a468c9fb4ee06cf13538/diff/etc/sysconfig/mongod  
/var/lib/docker/overlay2/944ad8776e1c4e043206b359787ed530eb398fb6bb71a468c9fb4ee06cf13538/diff/usr/bin/mongod  
/var/lib/docker/overlay2/944ad8776e1c4e043206b359787ed530eb398fb6bb71a468c9fb4ee06cf13538/diff/var/lib/selinux/targeted/tmp/modules/400/mongod  
/var/lib/docker/overlay2/60e23e41c63f2c78dd70a289682920173bf7a8d8677f000557625c608b37ce54/merged/etc/sysconfig/mongod  
/var/lib/docker/overlay2/60e23e41c63f2c78dd70a289682920173bf7a8d8677f000557625c608b37ce54/merged/usr/bin/mongod  
/var/lib/docker/overlay2/60e23e41c63f2c78dd70a289682920173bf7a8d8677f000557625c608b37ce54/merged/var/lib/selinux/targeted/tmp/modules/400/mongod  
[root@mongodb-test6 ~]#

---

<div class="post-metadata">

**Author:** ![arlindo.neto](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/arlindo.neto/32/6930_2.png) [@arlindo.neto](https://forums.percona.com/u/arlindo.neto)\
**Post date:** [November 18, 2024, 4:42pm UTC](https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064/5 "2024-11-18T16:42:03Z")

</div>

Hi,

I see that you are running with containers. I also see that you have this pbm status output:

```
rs1/192.168.40.116:27017 [S]: pbm-agent v2.3.0 OK
rs1/192.168.40.124:27017 [P]: pbm-agent v2.3.0 OK

```

I do not know how you are hosting these processes, but if you are using containers:  
Run pbm agent processes on the same container , or deploy a podman pod:

> <https://github.com/containers/podman/blob/main/docs/tutorials/podman_tutorial.md>

If you are using docker, you can use docker compose alternatively.

If you are running on VMs or bare metal servers, You’d have to deploy pbm CLI on one of the nodes. This will fix mongod missing package.

hope it helps.

---

<div class="post-metadata">

**Author:** ![Jayaprakash\_Duraisam](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jayaprakash_duraisam/32/18251_2.png) [@Jayaprakash\_Duraisam](https://forums.percona.com/u/Jayaprakash_Duraisam)\
**Post date:** [November 19, 2024, 5:36am UTC](https://forums.percona.com/t/restore-on-replicaset-rs1-in-state-error-check-mongod-binary-run-exec-mongod-executable-file-not-found-in-path-stderr/35064/6 "2024-11-19T05:36:51Z")

</div>

Hello @arlindo.neto

Will look into this and keep you posted on this.
