You should be able to embed code fragments that show examples of the data, or upload an example of data from both environment onto mongo playground:

Depending on if your data has something like a “last updated” stamp you could either:

  • Create a monitoring application as @steevej suggested where it’ll open a change stream on each database and based on the change detected create an update to keep the other in sync.
  • Have a scheduled task every X period that will check what has been changed and merge the modified document over to the other collection. You may need to be VERY careful with this in case of updates on both sides have been done and then need to replicate changes on both side to the other without losing changes.

If you give sample documents, a better solution may be obvious though! It does seem a bit of a bad situation to be in though, having the data duplicated like this, long term it may be best to see if you could re-architect the system to have a single database storage and cut down on complexities!

1 Like