Restore an existing installation

I had an existing installation of oC 9 on my ubuntu 14.04 server.
Then I upgraded to 16.04 and oC was gone.
My data directory was on an external disk and I checked that files are still there, but I can't reach them.
So I tried to reinstall oC from scratch to have it setup apache by itself, but I wonder if I can recover my old setup with the data directory on external disk and users and so on.
Any suggestion?
TIA

Hi,

restoring an existing installation should be as easy as following the restoring backup steps provided here:

https://doc.owncloud.org/server/9.1/admin_manual/maintenance/restore.html

If you have lost your database and your config.php then at least the users are lost. If that is the case we can follow with additional info how to restore at least the files of those users.

I'm not so strong on databases, where should it be my database?
Never mind, I solved: it was just a metter of disable maintenaince mode and everything was there.