Hi,
I have a problem with my mongorestore.
I have a replica set with 1 primary, 2 secondary. 1 passive and 1 arbiter
I took a complete backup of my DB on my passive mongo instance :mongodump--oplog --journal
If a drop my db on the primary and restore the backup :
mongorestore --journal --oplogReplay /dump
The backup is restored correctly (no problem). So if I don't drop the database and apply some modification to the collection like an insert, drop and/or update and I try to restore the backup to the current DB, I don't have any error so if I verify the data, all the data in the database as the same of before the restore (the updated data).
// Original data (Backup data)
{
"_id" : 1,
"av" : 101,
"cost" : 50,
}
{
"_id" : 2,
"av" : 101,
"cost" : 50,
}
{
"_id" : 3,
"av" : 101,
"cost" : 50,
}
// Updated data
// _id 1 is removed
{ //Updated
"_id" : 2,
"av" : 101,
"cost" : 75,
}
{
"_id" : 3,
"av" : 101,
"cost" : 50,
}
{ //added
"_id" : 4,
"av" : 101,
"cost" : 750,
}
// Restored data (????? not equal to the backup data)
{
"_id" : 2,
"av" : 101,
"cost" : 75,
}
{
"_id" : 3,
"av" : 101,
"cost" : 50,
}
{
"_id" : 4,
"av" : 101,
"cost" : 750,
}
Best regards