script to copy a whole database