Fix db dump script

This script is still disabled, but these are the fixes for it.
only related because of the new db dump disclosure banner.