The point is to decide what is you. But prior to that we must ask for whom is it to decide this. People can have disagreements, especially on this topic, but it seems for me, this is not that easy topic.
Why do you think that you, more preciously your body including brain and all the memory inside it, is you? Because you have capability for this and use this capability. Of course, there are some other relevant points like your ability to control yourself, which is an important factor.
But let's look at this from another side. What if your body and the brain is merely under remote control, e.g. brain in a vat? But you can never experience this brain, only the remote controlled body, which is decided by this brain to be you. This brain does not even consider itself to be a part of you.
Now regarding the replication of you. Assuming the first scenario in which the mind is fully contained within the body, replicating it will result in the same mind state which decides who are you. Including memories, meaning this replicated person will think that the person who will have decided to create him/her is his/her past self.
In the second scenario creating a replication is neither sufficient nor necessary (and in the first case it's not necessary as well). You would need to cheat the agent who decides to be you. How to do that, of course, is a very broad topic depending on the given model, so I won't go deeply into it.