just look at the documentation for cloning a database, it's all in there