Help. User and shared files are gone after server reboot

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 13.0.1
Operating system and version (eg, Ubuntu 17.04): Raspbian mit ubuntu 16.04 LTS
Apache or nginx version (eg, Apache 2.4.25): ? (Installed in August 17 )
PHP version (eg, 7.1): Installed in August 17…
setup: Raspbian with Nextcloud and a mounted share with a Synology as file server

The issue you are facing: until two weeks back, every worked perfectly. then I had some power outages in my appartment and afterwards syncing didnt really work at all anymore. I was frustrated and my solution was trying a new User for a clean sync start and Hey, it worked perfectly! since then, no problems at all. Syncing was great.
Now, I had another power outage and afterwards my new user (and a newly created shared folder) are GONE! they do not exit in Nextlcoud any longer. What I now did: I created the exact same user and all my files showed up (remember, they are stored on the synology). What I did next is reboot my raspPI with sudo reboot and again! the new user is gone!

From my own install documentation, I used the following commands again before reboot, just in case, but apparently, it didnt help:
a) sudo chown -R www-data:www-data /var/www/html
b) in mariaDB: grant all privileges on nextcloud.* to nextcloud@localhost;
flush privileges;

Is this the first time you’ve seen this error? (Y/N): y

The output of your Nextcloud log in Admin > Logging:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT `fileid`, `storage`, `path`, `path_hash`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum` FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ?' with params [1, "6522d9ebbcaf75d1c401e423b7834463"]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Fatal
webdav
Sabre\DAV\Exception\BadRequest: expected filesize 1070337 got 901120

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

dont know how to get this

The output of your Apache/nginx/system log in /var/log/____:

dont know how to get this

This seems like setup mistakes by the user.

Well, firstly you are mixing here in this topic different languages. I assimilated it to english.

Sencondly your knowledge of webserver is not very well, because you give us a date and not really a php version as information about your environment.
How did you installed it finally?
I suggest not to follow any instructions blind, because in the end you are responsible for the system that you are running.
Your Problem could have different solutions, but with that lack of information I don’t have any suggestions at the moment.

I guess the sd card of your Raspi is now readonly or is broken.

I had this on 3 pieces, thats the reason why i dont use RaspberryPi for Nextcloud anymore.