pbm全称percona backup mongodb,是percona公司提供的mongodb的备份恢复工具,支持percona mongodb,community mongodb,支持版本>v3.6,pbm底层是调用mongodump/mongorestore进行转储备份,由于该工具开发时间还不到1年,目前对分片集群的支持力度较弱,且不支持增量备份。
/bin/sh -c /home/work/backup/pbm-agent --mongodb-uri=mongodb://mongo_bakup:123456@127.0.0.1:27027/?replicaSet=myset &> /home/work/backup/pbm-agent.27027.log
查看历史备份:
[work@xxx pbm]$ ./pbm list --mongodb-uri="mongodb://mongodb_dba:123456@127.0.0.1:28042/?replicaSet=glc-test" Backup history: 2020-11-09T11:49:33+08:00 2020-11-09T13:35:52+08:00 2020-11-11T00:04:20+08:00 2020-11-13T00:04:06+08:00 2020-11-15T00:04:10+08:00 2020-11-17T00:04:25+08:00 2020-11-19T00:04:05+08:00 2020-11-21T00:04:04+08:00 2020-11-23T00:04:04+08:00 2020-11-25T19:19:13+08:00 2020-11-27T14:37:57+08:00 In progress [running] (Launched at 2020-11-27T14:37:58+08:00) [work@xxx pbm]$
###############################################################################