mongorestore replay archive oplog file failed

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • 0.25
    • Not Needed
    • v4.4

      I dump oplog with the follow command

      $ mongodump  --gzip -d local -c oplog.rs --query '{"ts":{"$gte": { "$timestamp": {"t": 1700120092, "i": 1}},"$lte":{"$timestamp": { "t": 1700135262, "i": 9999}}}}' --archive > xx.gz 

      then i can't restore it with --oplogReplay

      $ cat  xx.gz | mongorestore  --gzip  --oplogReplay --archive
      2023-11-16T19:52:53.954+0800    preparing collections to restore from
      2023-11-16T19:52:53.954+0800    Failed: no oplog file to replay; make sure you run mongodump with --oplog
      2023-11-16T19:52:53.954+0800    0 document(s) restored successfully. 0 document(s) failed to restore. 

       How can I replay these oplog correctly with mongorestore

       

      the mongorestore info:

      mongorestore version: 100.5.2
      git version: e2842eb549308c16e070fb2e197d4631cfd085cb
      Go version: go1.16.7
         os: linux
         arch: amd64
         compiler: gc 

            Assignee:
            Johnny DuBois (Inactive)
            Reporter:
            stephen yang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: