Help Recovering my next cloud data after crash using snapon Ubuntu 21.04

We are having power outages in my area for the past few months. I set up a Nexcloud server on my Ubuntu server using snap. I’m new to Nextcloud but for the most part, everything was doing what it was supposed to. I use Nextcloud to host my work data and all my personal stuff. I haven’t set up the backup yet as I was still testing out Nextcloud. the long and short end is after the power outages my original drive and the backup drives are buggered but I do have copies on my Nextcloud server. However not all my data is accessible. I’m convinced the power outage corrupted my Nextcloud server files but I don’t know how to fix it. I’ve done multiple google searches and they say to run an occ file scan but I can’t get it to work on my Nextcloud server and I’m guessing its because I used snap to set it up. I get a path not found error or file not recognized error. if I log in via the web gui i can see all my data however if I try to open my image files it says file not recognized. I tried copying it to my laptop to check but get the same error. I also noticed that the files giving me the issues also don’t have a thumbnail image like all the others. Forgot to mention I’m hosting this locally and not in teh cloud as yet.

read in another link that it could be related to me using server-side encryption, but there isn’t any reference on how to fix it.


Nextcloud snap will not have server side file encryption enabled by default. You will have to manually turn it on. So chances are, if the disk is readable (in your Ubuntu Server) then your file are for the time being safe.

You must have stable power for any server side operation. Consider adding UPS as soon as possible. Multiple and regular sudden stops will definitely effect your disc and eventually you are looking at hardware issue.

But having said that, modern OS and software are somewhat resilient on this issue. Sure the stuff in RAM will definitely be lost. But stuff which are already in disc should be fine till the disc itself is working.

How to Recover?

Need more details on the issue for troubleshooting the installation (Database & Nextcloud itself)

But your entire user data is accessible @ /var/snap/nextcloud/common/nextcloud/data

Copy the data out from there.

If the installation can’t be saved, then you can reinstall OS and Nextcloud, then manually reupload the data back in your server.


Many thank I ended up doing that but some of the files are corrupted. I’m. Happy that it wasn’t all. Thank you for the feedback much appreciated.

The call can be closed.

1 Like