Mongodump with oplog throws replica set: "oplog mode is only supported on full dumps"

I have a replica set with 3 members. Each of them runs mongod 2.4.8 on Linux. I use an MMS agent to monitor the health of my replicas / host, and everything looks fine.

I use mongodump to backup my dbs and can make a successful dump if I don't use the -oplog switch, for example:

mongodump -v --db "mydb" --out /backups

However, when I backup live db, I want to use the -oplog switch. Therefore, I changed my command by including the -oplog switch in it and setting my replica set in the -hosts switch:

mongodump -v --oplog --host myrepset/m1:27017,m2:27017,m3:27017 --db "mydb" --out /backup

However, this command fails with this error: oplog mode is only supported on full dumps.

This is apparently the same error that occurs when you try to use the -oplog switch in one instance.

I read Mongo tutorials and man pages, but I don’t understand what I am doing wrong. http://docs.mongodb.org/manual/reference/program/mongodump/

Any help is greatly appreciated.

+4
source share
1 answer

The -oplog option for mongodump is for full dumps, not for those that specify a separate database. To start it, you need to remove --db "mydb"mongodump from the command.

+3
source

Source: https://habr.com/ru/post/1540733/


All Articles