Adding copy database function for testing