create db dump function