To start replication from a specific point in time on a MongoDB source, you will need to identify the oplog stream position (BSON Timestamp) corresponding to your target time and configure it in your Qlik Replicate task.
This article outlines the options available to you.
Prerequisites
The MongoDB oplog is a capped collection, and entries are overwritten over time. Ensure your target timestamp is still within the current oplog window before attempting to start from it.
Query the primary node or a secondary with sufficient oplog retention.
The Qlik Replicate MongoDB user requires read access to local.oplog.rs.
Finding the stream position
Option One: Query the oplog directly (Recommended)
The ts value is your stream position. The first number is Unix epoch seconds; the second is the ordinal increment.
Option Two: Query the oplog by target timestamp
If you know the specific time you want to start from, you can filter the oplog directly to find the closest entry:
var t = new Timestamp(Math.floor(new Date("2026-03-10T11:30:00Z").getTime() / 1000), 1); db.getSiblingDB('local').oplog.rs.find({ ts: { $gte: t } }).limit(1).pretty()
Replace the date string with your target time. This returns the first oplog entry at or after that timestamp, giving you the exact ts value to use.
Option Three: Use rs.status() for orientation
The rs.status() command returns the current replication position (optimeDate and optime.ts) for each replica set member:
rs.status()
This is useful for cross-referencing a wall-clock time to an approximate oplog position. Once you have an approximate position, use option two to pinpoint the exact ts value.
Option Four: Let Qlik Replicate log it for you
Start the task normally (without specifying a position) and allow Qlik Replicate to connect to the MongoDB oplog. Qlik Replicate will log the current stream position it reads from in the task log output, in the exact format it expects. You can then use that as a reference and template for entering positions manually in future tasks.
This is the safest way to confirm the correct position format for your version of Qlik Replicate before attempting a manual entry.
Configuring the stream position in Qlik Replicate
Once you have your stream position value:
Open your task and click the Run drop-down > Advanced Run Options
Under Tables are already loaded. Start processing changes from:, select Source change position (e.g. SCN or LSN):
Enter the stream position in the format Qlik Replicate expects
Note: We recommend using option four first to confirm the exact position format your version of Qlik Replicate expects for MongoDB, as this can vary. Entering the value in an incorrect format will cause the task to start from an unintended position.