I had a similar problem. It seemed that I did not have all my plugins disabled when I used the upgrade script. I lost all my categories like you did.
I may have had some plugins enabled when I upgraded. Dang confirmation dialog :). After “downgrading” my db version and performing an upgrade again, things seem to be happier.