Fix db dump script

This script is still disabled, but these are the fixes for it.
Yup. and we can spot-check again on dev and stage servers.