To make it clear… the database alone will not get your files back. As @himbeere said, if you do have a copy of your old data directory, you can get those back, but not, if you do only have the database.
What I’m hoping you can tell me is that: I can use the database to recreate all the configuration of users, shares, calendars etc. And then the sync client can recreate all the data from the various devises’ local copies.
I don’t think I had anything on the nextcloud data storage that wasn’t stored on at least one device.
What I’m hoping you can tell me is that: I can use the database to recreate all the configuration of users, shares, calendars etc. And then the sync client can recreate all the data from the various devises’ local copies.
I doubt this will work. Interesting idea though. What will work is taking the data from on of the clients, copy them to the server and run the mentioned command.
And should I put nextcloud in to maintenance mode as soon as I get it fired up. And keep it like that till I’ve copied all the data over and recreated the database for files?
Can anyone point me to the file structure I need to recreate in the data folder to position the files copied from devices?
And should I put nextcloud in to maintenance mode as soon as I get it fired up. And keep it like that till I’ve copied all the data over and recreated the database for files?
Not really neccessary but wise i guess.
Can anyone point me to the file structure I need to recreate in the data folder to position the files copied from devices?
Do you like puzzles? If yes, you can restore your NC, but it will involve a lot of fiddling with your database - especially with the oc_share table and the data re-synched to your user directories.
NC manages all it’s files through IDs in oc_filecache and the shares in oc_shares. The issue is, that the cliente may have downloaded the shared files and will upload them again, if you connect them to your new NC instance. This will be the main culprit, as this will break the shares in oc_share.
However, my approach to this would be roughly like this:
create a new NC instance and make sure the path to the user data is exactly as it has been before
have the user accounts sync their data - no frills, just files
now cross-reference the shares and try to delete the shared data from the user directories, before proceeding
stop your NC instance and replace the oc_filecache and oc_share from the salvaged database