In addition to the answers above, I would add that a duplicate mostly apply to objects, like an ID card duplicate in case of loss or damage, a line in a source code, a photocopy of a document...
The noun replicate was already stated by previous answers, but now, let's consider the verb to replicate
Consider a crime scene witnessed by someone. When asked from the police, the witness may for example replicate the gestures of the murderer to describe how the scene went. In this context, it is more like mimics, trying to be as close as possible to the original action.
Now, consider software engineering. The tester tells the programmer that there is a bug on the X module. The programmer tests the module but is unable to find out what manipulations the tester did in order to the bug to occur. He then calls the tester to show him what he did step by step. The tester then replicates his actions and the bug is occuring again.
So, the verb to replicate may still infer copying something, but it could also be re-doing something, as the verb to duplicate is mostly making a copy of something.