Can I use the current database when reinstalling nextcloud?

I somehow deleted my nextcloud vm. :sweat: The database however, is on a different vm, and I would like for the new nextcloud install to use the already existing database. Is this possible and how do I configure this during installation?

Edit: I’m using ubuntu server 16.04 with apache, php7.0 and nextcloud 10. The database is also used with nextcloud 10.

Do you have a copy of config.php left somewhere?

No, not a copy. I guess it’s a good idea to make one now :slight_smile:
All I have left is /data.

I’ve done this… the pang of realisation when it hits is painful. I thought I’d deleted some old test servers earlier in the day but unfortunately selected the wrong one in what I can only describe as a senior moment…

Anyway, I replicated my config.php as closely as possible to the original after setting up a fresh install, shut down Apache, edited the config to input the relevant remote DB and data location information, then started Apache again and hoped for the best :smiley:

(It was fine, aside from a few apps I had to reinstall)

That’s exactly what happened. Migrated from Owncloud and didn’t need those instances anymore so I deleted Nextcloud instead of Owncloud. After deleting the Owncloud instances I realised I didn’t have any left… :scream:

Ooh well, I’ll setup a temporary db, use that config to hopefully get back into my old one.

You want to keep old data of the database (sharing settings?). To really use it in order to perform an upgrade you need your config.php of the old setup. For some apps you can probably recover manually data from the old database. But that’s not really recommended, you should ask the specific app developer if it’s possible and probably do backup everything before.

If it is just the empty database, you can use any empty database you want (you need a user with all permissions granted to this database, or the credentials of root who will then create a user itself).