Modifying dump script so that it can be run on the server