Move the database dir away and start with a fresh one when the upgrade procedure fails.