Accidentially deleted NGINX-folder while updating

Thanks,bro. I’ve encountered another tricky issue. I accidentally deleted the NGINX folder, but the Nextcloud folder and database should still be intact. How can I recover this Nextcloud instance? Despite copying the previously backed-up NGINX folder back to its original location, the instance remains unrecoverable. :thinking:

Josh R. via Nextcloud community <noreply@help.nextcloud.org> 于2024年4月2日周二 00:24写道:

What are the specifics symptoms/errors you’re experiencing?

It appears that the SSL certificate was not found, but my certificate storage path is in a different directory, and no changes have been made.

Josh R. via Nextcloud community <noreply@help.nextcloud.org> 于2024年4月2日周二 10:12写道:

after a reboot, its all internal erro page now.this is what i got from command line
tail -n 1 /srv/nextcloud/data/nextcloud.log | jq
parse error: Unfinished string at EOF at line 1, column 448

Josh R. via Nextcloud community <noreply@help.nextcloud.org> 于2024年4月2日周二 10:12写道:

I think it would have been easier to recover if you didn’t disable backups while upgrading at first place :person_facepalming:

god helps me, !! are three backups in nextcloud’s backup directory, but I don’t know if them valid or not, because there ware error massage showen ont the web page.
could you show me how to recover from those backups😂

Jimmy Kater via Nextcloud community <noreply@help.nextcloud.org> 于2024年4月2日周二 13:24写道:

Is it a permissions issue? What account(s) are the owner/group for the restored NGINX folder? What account is the service running as? Could you just re-install NGINX and copy the config over once the service is running?

My NGINX directory ownership is root, while the owner of my Nextcloud installation is www-data. I just checked my other Nextcloud servers, and since I deploy them in the same way, it doesn’t seem to be a permission issue. However, because I also have a Mastodon instance running on NGINX, reinstalling NGINX would result in an error1.

I backed up NGINX using the CP command into an NGINX.BAK folder, then deleted the NGINX and certificate folders with RM -RF. Afterward, I restored the NGINX and certificate folders using the CP command, but everything changed. The permissions were root both before and after, which is quite puzzling.

Chad Andersen via Nextcloud community <noreply@help.nextcloud.org> 于2024年4月2日周二 13:49写道:

Most probably you have a certificate problem if it complains on that. Try to solve that first. Nginx is probably correct but certificate path or cert itself is the problem.