# Manage pbm-agent backups from the pmm-server user interface

**URL:** <https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774>\
**Category:** Percona Backup for MongoDB\
**Created:** [May 1, 2023, 11:22am UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774 "2023-05-01T11:22:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ernestojpg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ernestojpg/32/19042_2.png) [@ernestojpg](https://forums.percona.com/u/ernestojpg)\
**Post date:** [May 1, 2023, 11:22am UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/1 "2023-05-01T11:22:50Z")

</div>

Hello everyone!

I’m trying to manage my MongoDB backups from the PMM (Percona Monitoring and Management) User Interface, rather than having to use the pbm CLI. Basically, I would like to do the typical operations: list backups, create a new backup (on demand), schedule backups, etc from the user interface. Looking at the documentation in the Percona’s website, it seems to be possible.

But when I try to create a new Backup (Backup → All DBaaSBackups → Create backup) and fill in all the fields I get the following error message: “ **software “mongodb” is not installed: incompatible service** ”.

 ![backups](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/0/0cbeced9fb3f3c4c2668195300a13257c9fd8034.png)

I have the tipical setup: 1 PMM-Server (version 2.36.0), and 3 Percona MongoDB nodes (version 5.0.15) as a ReplicaSet. On each of the MongoDB nodes I have a PMM-Client (version 2.36.0) connected to the PMM-Server, and a PBM-Agent (version 2.1.0) connected to the Mongo Cluster. Everything seems to be configured correctly.

I think I have applied all steps described in the documentation, and I still cannot make it work. Am I missing something?

Thanks in advance.  
Ernesto.

---

<div class="post-metadata">

**Author:** ![ernestojpg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ernestojpg/32/19042_2.png) [@ernestojpg](https://forums.percona.com/u/ernestojpg)\
**Post date:** [May 2, 2023, 9:07am UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/2 "2023-05-02T09:07:01Z")

</div>

Please note that I’m not using DBaaS (Kubernetes operator, etc). I deployed everything manually.

Are Backups from PMM only available for DBaaS?

Regards.

---

<div class="post-metadata">

**Author:** ![Parag\_Bhayani](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/parag_bhayani/32/3710_2.png) [@Parag\_Bhayani](https://forums.percona.com/u/Parag_Bhayani)\
**Post date:** [May 2, 2023, 2:52pm UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/3 "2023-05-02T14:52:37Z")

</div>

Hi @ernestojpg ,

Firstly, backups from PMM are currently available for all MongoDB ReplicaSet cluster deployment.  
From the error it seems that the MongoDB service might not be running on that node. Kindly verify it.  
Also kindly share the rs.status output along with the inventory list from PMM.

Regards,  
Parag

---

<div class="post-metadata">

**Author:** ![ernestojpg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ernestojpg/32/19042_2.png) [@ernestojpg](https://forums.percona.com/u/ernestojpg)\
**Post date:** [May 2, 2023, 3:25pm UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/4 "2023-05-02T15:25:49Z")

</div>

Hello @Parag_Bhayani !

Thanks for your response.

This is the result of a **“pmm-admin status”** in the MongoDB Node 1:

```auto
bash-5.1$ pmm-admin status
Agent ID : /agent_id/c69459c4-74f2-466b-9a0a-331fd99fd622
Node ID : /node_id/62f97d5c-ca26-464a-8b59-9d874ba72ccd
Node name: mongodb1

PMM Server:
	URL : https://172.31.29.27:443/
	Version: 2.36.0

PMM Client:
	Connected : true
	Time drift : 373.269µs
	Latency : 630.557µs
	Connection uptime: 100
	pmm-admin version: 2.36.0
	pmm-agent version: 2.36.0
Agents:
	/agent_id/665da036-49b3-4513-a4da-881b0ec9a46d mongodb_profiler_agent Running 0
	/agent_id/703f3a41-bb35-4b0d-bb02-0130da68798b vmagent Running 42000
	/agent_id/7c84cad5-bdca-4526-a9e9-eaaa7fc53115 mongodb_exporter Running 42002
	/agent_id/cc2d85b0-86c5-4387-9a78-fe4156c17d27 node_exporter Running 42001

```

This is the result of a **“pmm-admin list”** in the MongoDB Node 1:

```auto
bash-5.1$ pmm-admin list
Service type Service name Address and port Service ID
MongoDB mongodb1 127.0.0.1:27017 /service_id/7466daeb-6fbf-477c-a296-ceb95df4e621

Agent type Status Metrics Mode Agent ID Service ID Port
pmm_agent Connected /agent_id/c69459c4-74f2-466b-9a0a-331fd99fd622 0
node_exporter Running push /agent_id/cc2d85b0-86c5-4387-9a78-fe4156c17d27 42001
mongodb_exporter Running push /agent_id/7c84cad5-bdca-4526-a9e9-eaaa7fc53115 /service_id/7466daeb-6fbf-477c-a296-ceb95df4e621 42002
mongodb_profiler_agent Running /agent_id/665da036-49b3-4513-a4da-881b0ec9a46d /service_id/7466daeb-6fbf-477c-a296-ceb95df4e621 0
vmagent Running push /agent_id/703f3a41-bb35-4b0d-bb02-0130da68798b 42000

```

This is the result of a **“rs.status()”** in the MongoDB node 1:

```auto
{
	"set" : "myReplicaSet",
	"date" : ISODate("2023-05-02T15:12:36.113Z"),
	"myState" : 1,
	"term" : NumberLong(1),
	"syncSourceHost" : "",
	"syncSourceId" : -1,
	"heartbeatIntervalMillis" : NumberLong(2000),
	"majorityVoteCount" : 2,
	"writeMajorityCount" : 2,
	"votingMembersCount" : 3,
	"writableVotingMembersCount" : 3,
	"optimes" : {
		"lastCommittedOpTime" : {
			"ts" : Timestamp(1683040355, 1),
			"t" : NumberLong(1)
		},
		"lastCommittedWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
		"readConcernMajorityOpTime" : {
			"ts" : Timestamp(1683040355, 1),
			"t" : NumberLong(1)
		},
		"appliedOpTime" : {
			"ts" : Timestamp(1683040355, 1),
			"t" : NumberLong(1)
		},
		"durableOpTime" : {
			"ts" : Timestamp(1683040355, 1),
			"t" : NumberLong(1)
		},
		"lastAppliedWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
		"lastDurableWallTime" : ISODate("2023-05-02T15:12:35.851Z")
	},
	"lastStableRecoveryTimestamp" : Timestamp(1683040310, 1),
	"electionCandidateMetrics" : {
		"lastElectionReason" : "electionTimeout",
		"lastElectionDate" : ISODate("2023-04-26T14:52:08.891Z"),
		"electionTerm" : NumberLong(1),
		"lastCommittedOpTimeAtElection" : {
			"ts" : Timestamp(1682520718, 1),
			"t" : NumberLong(-1)
		},
		"lastSeenOpTimeAtElection" : {
			"ts" : Timestamp(1682520718, 1),
			"t" : NumberLong(-1)
		},
		"numVotesNeeded" : 2,
		"priorityAtElection" : 1,
		"electionTimeoutMillis" : NumberLong(10000),
		"numCatchUpOps" : NumberLong(0),
		"newTermStartDate" : ISODate("2023-04-26T14:52:08.941Z"),
		"wMajorityWriteAvailabilityDate" : ISODate("2023-04-26T14:52:09.462Z")
	},
	"members" : [
		{
			"_id" : 0,
			"name" : "172.31.31.78:27017",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 519972,
			"optime" : {
				"ts" : Timestamp(1683040355, 1),
				"t" : NumberLong(1)
			},
			"optimeDate" : ISODate("2023-05-02T15:12:35Z"),
			"lastAppliedWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
			"lastDurableWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
			"syncSourceHost" : "",
			"syncSourceId" : -1,
			"infoMessage" : "",
			"electionTime" : Timestamp(1682520728, 1),
			"electionDate" : ISODate("2023-04-26T14:52:08Z"),
			"configVersion" : 1,
			"configTerm" : 1,
			"self" : true,
			"lastHeartbeatMessage" : ""
		},
		{
			"_id" : 1,
			"name" : "172.31.30.30:27017",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 519637,
			"optime" : {
				"ts" : Timestamp(1683040352, 1),
				"t" : NumberLong(1)
			},
			"optimeDurable" : {
				"ts" : Timestamp(1683040352, 1),
				"t" : NumberLong(1)
			},
			"optimeDate" : ISODate("2023-05-02T15:12:32Z"),
			"optimeDurableDate" : ISODate("2023-05-02T15:12:32Z"),
			"lastAppliedWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
			"lastDurableWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
			"lastHeartbeat" : ISODate("2023-05-02T15:12:34.238Z"),
			"lastHeartbeatRecv" : ISODate("2023-05-02T15:12:34.522Z"),
			"pingMs" : NumberLong(0),
			"lastHeartbeatMessage" : "",
			"syncSourceHost" : "172.31.31.78:27017",
			"syncSourceId" : 0,
			"infoMessage" : "",
			"configVersion" : 1,
			"configTerm" : 1
		},
		{
			"_id" : 2,
			"name" : "172.31.25.63:27017",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 519637,
			"optime" : {
				"ts" : Timestamp(1683040355, 1),
				"t" : NumberLong(1)
			},
			"optimeDurable" : {
				"ts" : Timestamp(1683040355, 1),
				"t" : NumberLong(1)
			},
			"optimeDate" : ISODate("2023-05-02T15:12:35Z"),
			"optimeDurableDate" : ISODate("2023-05-02T15:12:35Z"),
			"lastAppliedWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
			"lastDurableWallTime" : ISODate("2023-05-02T15:12:35.851Z"),
			"lastHeartbeat" : ISODate("2023-05-02T15:12:36.050Z"),
			"lastHeartbeatRecv" : ISODate("2023-05-02T15:12:34.663Z"),
			"pingMs" : NumberLong(0),
			"lastHeartbeatMessage" : "",
			"syncSourceHost" : "172.31.31.78:27017",
			"syncSourceId" : 0,
			"infoMessage" : "",
			"configVersion" : 1,
			"configTerm" : 1
		}
	],
	"ok" : 1,
	"$clusterTime" : {
		"clusterTime" : Timestamp(1683040355, 1),
		"signature" : {
			"hash" : BinData(0,"Q89GURIwKWC6NxezL7kVV/7mIcM="),
			"keyId" : NumberLong("7226371501602111492")
		}
	},
	"operationTime" : Timestamp(1683040355, 1)
}

```

These are the Services in PMM Inventory:

 ![services](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/1/1b684f12abb14ea5f5f25467048e49ca1148a04c.png)

And these are the Nodes in the PMM Inventory:

 ![nodes](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/6/6f9a4a67b7fa034f8f9b4f0a49a8c09176cdec05.png)

Also note that in each MongoDB Node we have these 3 services running inside Docker:

- **percona/percona-server-mongodb:5.0.15** running isolated, but exposing port 27017
- **percona/pmm-client:2.36.0** running in network\_mode: host
- **percona/percona-backup-mongodb:2.1.0** running in network\_mode: host

Do pmm-client or pbm-agent require to call the “mongo” service directly, or everything happens through the standard 27017 port?

Thank you very much.  
Ernesto.

---

<div class="post-metadata">

**Author:** ![Parag\_Bhayani](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/parag_bhayani/32/3710_2.png) [@Parag\_Bhayani](https://forums.percona.com/u/Parag_Bhayani)\
**Post date:** [May 2, 2023, 3:51pm UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/5 "2023-05-02T15:51:20Z")

</div>

Hi @ernestojpg ,

Have you enabled the ENABLE\_BACKUP\_MANAGEMENT=1 parameter when you ran the docker run command?

> For setups where PMM Server runs as a Docker container, enable backup features at container creation time by adding `-e ENABLE_BACKUP_MANAGEMENT=1` to your `docker run` command.

Kindly refer MongoDB backup prerequisites -

> **[Percona Monitoring and Management - MongoDB backup prerequisites](https://docs.percona.com/percona-monitoring-and-management/get-started/backup/mongo-prerequisites.html)**
>
> Before creating MongoDB backups, make sure to:

Regards,  
Parag

---

<div class="post-metadata">

**Author:** ![ernestojpg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ernestojpg/32/19042_2.png) [@ernestojpg](https://forums.percona.com/u/ernestojpg)\
**Post date:** [May 2, 2023, 4:02pm UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/6 "2023-05-02T16:02:52Z")

</div>

Hello @Parag_Bhayani !

I think Backup Management is enabled by default in the latest versions of PMM Server, but yes, I added the option, just in case. This is the docker-compose I use:

```auto
version: "3.9"
services:
  pmm-server:
    image: percona/pmm-server:2.36.0
    network_mode: "host"
    restart: unless-stopped
    volumes:
      - ${PWD}/data:/srv
    environment:
      - ENABLE_BACKUP_MANAGEMENT=1

```

I can see the Backups section in PMM Server. What I don’t know is why it says “DBaaSBackups” everywhere if I’m not using DBaaS…

 ![backups](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/4/458b2e030aede6f7e498eff9da07b207595b92fa.png)

I think I followed all prerequisites in that document. I don’t know what I’m missing here …

Thanks.  
Ernesto.

---

<div class="post-metadata">

**Author:** ![ernestojpg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ernestojpg/32/19042_2.png) [@ernestojpg](https://forums.percona.com/u/ernestojpg)\
**Post date:** [May 2, 2023, 4:06pm UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/7 "2023-05-02T16:06:43Z")

</div>

Just to let you know, when I try to create a new Backup I see that error in PMM Server, but I also see this error in the logs:

```auto
==> pmm-managed.log <==
INFO[2023-05-02T16:04:42.933+00:00] Starting RPC /backup.v1.Backups/StartBackup ... request=0cec3377-e903-11ed-8ae6-067cb96f2d37
WARN[2023-05-02T16:04:42.940+00:00] RPC /backup.v1.Backups/StartBackup done in 7.489881ms with gRPC error: rpc error: code = FailedPrecondition desc = software "mongodb" is not installed: incompatible service request=0cec3377-e903-11ed-8ae6-067cb96f2d37

```

Regards.  
Ernesto.

---

<div class="post-metadata">

**Author:** ![Pavel\_Khripkov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pavel_khripkov/32/10444_2.png) [@Pavel\_Khripkov](https://forums.percona.com/u/Pavel_Khripkov)\
**Post date:** [May 4, 2023, 10:37am UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/8 "2023-05-04T10:37:05Z")

</div>

Hello @ernestojpg. Currently PMM Backup management doesn’t support dockerized configurations. It’s required to have pmm-agent, pbm and mongod installed on the same host node. You’re getting error because pmm-agent cannot find installed mongod in the same environment.

Technically you can run backups for dockerized setups, but in that case all of the mentioned software should be installed in the same container and services should be managed by systemd.

---

<div class="post-metadata">

**Author:** ![ernestojpg](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ernestojpg/32/19042_2.png) [@ernestojpg](https://forums.percona.com/u/ernestojpg)\
**Post date:** [May 4, 2023, 1:37pm UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/9 "2023-05-04T13:37:37Z")

</div>

Hi @Pavel_Khripkov ,

Thanks for your response. I will try to install the software normally in the machine without Docker and let you know.

But it is really a pity. I though that all the components were working fine in Docker and Kubernetes. How do backups work in the Percona Operator for MongoDB (Kubernetes) described here then? [About backups - Percona Operator for MongoDB](https://docs.percona.com/percona-operator-for-mongodb/backups.html)

Regards.  
Ernesto.

---

<div class="post-metadata">

**Author:** ![Pavel\_Khripkov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pavel_khripkov/32/10444_2.png) [@Pavel\_Khripkov](https://forums.percona.com/u/Pavel_Khripkov)\
**Post date:** [May 4, 2023, 3:25pm UTC](https://forums.percona.com/t/manage-pbm-agent-backups-from-the-pmm-server-user-interface/21774/10 "2023-05-04T15:25:43Z")

</div>

To restore database from physical backup, it requires to restart mongod service after copying files back. When we’re using operators, we can stop existing containers and replace them with new ones. For regular backups we’re not managing containers. So we cannot restart database services to meet the requirements.
