* First draft of db replicate script