Not all path’s in the database are relative to the /owncloud/ directory.
Some have /owncloud/ in their path.
- oc_activity
- oc_cards
- oc_contacts_cards
- oc_contacts_cards_properties
- oc_news_items
- oc_properties
- oc_storages
so just copying data to a new nextcloud directory and restoring the database should’t work propper.