The scripts on this repository can be used to assist an ownCloud upgrade.
They just extract some information from ownCloud that can be used to restore the old state on a clean database.
Read the article Upgrading a large ownCloud instance to know when to use them.