Replication

@enisoc 

Creating an RPC command allows easier testing.