fixes to db backup script