Import existing users from prior ownCloud installation

I’ve set up a new server using Nextcloud 10 which is replacing an ownCloud server (ver. 9 something) that was in production.

Use case: my organization uses *cloud to send and receive files with another organization. We don’t necessarily keep the files on the server; it’s just an easy way to exchange large files.

I wanted a clean setup of Nextcloud 10 rather than an upgrade, which is done. The only thing lacking is user accounts.

The people in the organization we share files with made their own user accounts; I don’t know their passwords.

I’m not concerned with importing the data, since we both tend to move the data to longer term storage after the files are transferred, but is there a way to import the user names and passwords from the prior ownCloud installation? That would save lots of time (and probably annoyance at me, for making them recreate all their user accounts!) if possible.

I still have the prior installation of OC on a different server, so I can work from it if necessary. I also exported the MariaDB database file, so I’ve got that as well.

Is there a command line type operation, or could I possibly just import the user tables from the former database to the new database?

Turns out I was able to do this by the procedure in Restoring Nextcloud: https://docs.nextcloud.com/server/9/admin_manual/maintenance/restore.html

I only imported the prior database and the data folder from the prior installation.

For some reason I had to manually recreate the oc_notifications table and reinstall the desktop sync client, as I was getting an odd error when trying to sync it. But, all seems to be working fine now.

Edit to solution: best thing to do is to run through all of the prior updates and install them sequentially, not skipping any point releases (as I was inadvertently doing). I was running ownCloud version 8.1.# and the upgrade to Nextcloud 10 was, obviously failing. However it wasn’t failing enough to where I couldn’t use it. Plus, the admin page in ownCloud said I was using the current version (which I wasn’t).

Tricky, as you get an error but it still works - hence the deletion of the table from the database workaround.

Best solution is to do all the point upgrades (8.1 -> 8.2 -> 9.0 -> 9.1 -> 9.2 -> 10) and that way you don’t have any issues with the database. You can always clean out the data later.