Infosys interview question

Write script to duplicate a test database from its prod?