- Install repo and packages
- Create mongodb user as per https://www.percona.com/doc/percona-backup-mongodb/initial-setup.html#configure-authentication-in-mongodb
- Configure storage - must be shared storage, not a problem with S3/Minio, NFS or similar with path based though - https://www.percona.com/doc/percona-backup-mongodb/storage-configuration.html#pbm-config-example-yaml
- Test this with B2
- Install and setup agent, pbm cli
- Agent is using
/etc/default/pbm-agent
with one line of config -PBM_MONGODB_URI="mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin&replicaSet=rs0"
- pbm cli expects the same env variable to be setup - use .bash_profile or alias - root user/pbm user only
- Agent is using
- Start agents and check with
pbm status
, should get something like this below
:~# pbm status
Cluster:
========
rs0:
- rs0/192.168.33.30:27017: pbm-agent v1.4.1 OK
- rs0/192.168.33.31:27017: pbm-agent v1.4.1 OK
- rs0/192.168.33.32:27017: pbm-agent v1.4.1 OK
PITR incremental backup:
========================
Status [OFF]
Currently running:
==================
(none)
Backups:
========
FS /srv/pbm
Snapshots:
- Try creating a backup using
pbm backup
from any host in replicaset - TODO - create a simple Ansible role to do all of the above.