I configured the priorities using the configuration file:
pitr:
enabled: false
oplogSpanMin: 0
compression: s2
storage:
type: azure
azure:
account: dummyname
container: pbm-test
prefix: pbm
credentials:
key: ‘***’
backup:
oplogSpanMin: 0
priority:
fuzion-mongo-test-node-1.domain.internal:28018: 0.5
fuzion-mongo-test-node-2.domain.internal:28018: 0.5
fuzion-mongo-test-reporting-1.domain.internal:28018: 0.5
mongo-test-node-01.domain.internal:28018: 1
mongo-test-node-02.domain.internal:28018: 2
mongo-test-reporting-01.domain.internal:28018: 2.5
compression: s2
I used the following output from MongoDB to identify which server is running the backup (is there an easier way to do this?):
rsTest [direct: secondary] admin> db.pbmLock.find({type: “backup”})
[
{
_id: ObjectId(‘66c623fcbf206bc62285c1ed’),
type: ‘backup’,
replset: ‘rsTest’,
node: ‘mongo-test-node-01.domain.internal:27018’,
opid: ‘66c623fa4e5cff0810425134’,
epoch: Timestamp({ t: 1724261337, i: 11 }),
hb: Timestamp({ t: 1724261502, i: 1 })
}
]
I expected mongo-test-reporting-01 to run the backup with the priority setting of 2.5.
Any suggestions would be appreciated!
In the output, you had port :27018 - the default for MongoDB. But in the configuration of priorities you have ports :28018.
Is that a misspelling?
Thanks for responding, Radoslaw. No, we are running on alternate port 27018 (not sure what was behind that initially).
I’ve used that port in the connection string written to the environmental file, etc, and everything else seems to work as expected.
so to make it clear - problem solved now ?
No, the problem is exactly as I stated. I’ve defined the priorities as the documentation described and I show the output of the config file in the original post. The nodes are identified correctly, they are referencing the correct service point as I have clarified, and they are setting priorities to favor “mongo-test-reporting-01”. But the node running the backup is not the one with the highest priority, instead its “mongo-test-node-01” as the output of the mongo query shows.
Can you help me?
Hi,
Can you please try to execute:
pbm status
In the ‘Cluster’ section of the command’s output, you’ll be able to see exact names of all available agents (rs-name/hostname:port combination or just hostname:port combination). Please use hostname:port combination when specifying the backup priority for particular agent.
As Radoslaw pointed out it seems that you referenced wrong name in the config’s priority section.
To answering your second question:
I used the following output from MongoDB to identify which server is running the backup (is there an easier way to do this?)
The easiest way is to see it in pbm log, so if you execute ‘pbm logs’ you’ll be able to see log entry similar to this one:
2024-08-22T15:08:33Z I [rs1/rs102:27017] [backup/2024-08-22T15:08:32Z] backup started
‘Backup started’ message means that backup has been started on a particular agent, in the above case ‘rs102:27017’.
Thank you, Boris and Radoslaw. I was looking right at the number and still not seeing it. I moved all the port numbers to 27018 and now it works as expected.
Thanks again…