I am newbee and barely a month ago I installed Nextcloud 22.2 on docker on my pi4 to build a synch solution from windows laptop to the local cloud. I could install nextcloud successfully, create Admin user login and couple of users also. I set up synch between my windows folder (all my pi projects) with nextcloud folder on SDD mounted on the pi (this is place where volumes are mapped to for the docker instance). I could successfully test the synch and was now set to work on the files from any device so they would get synched to the windows laptop.
Recently however, when i connected checked form my windows machine, it complained that the app i had installed on windows was unable to connect to the pi server and i had to login. when i tried to login, it dint recognise user. On directly connecting the server, i was sent to “create admin user” again! I was confused, but i went on to create same admin user - it dint complain about existing user. Further i found that the users i had created were also gone… Today i found out that i have lost all the files in the folder i had synched and I am utterly confused whats gone wrong.
I am wondering why my user profiles had been lost - how can i avoid this recurrence? Importantly is there a way to recover those files? how do i trouble shoot.
Sorry. I am confused, too. That is not normal. All users are stored in the database (e.g. MariaDB) and the connection to the MariaDB is stored in config/config.php .
I think one possibilty is a restore of the MariaDB to point at installation. Was there any restore?
I have no idea why your user accounts were gone on your server. But that’s exactley why I tell everyone that synchornisation is not a backup and the sync is primary there to make files that reside on the server available on client devices and not the other way arround. Use backup tools or something like rsync to do backups of your clients . The backup target can of course also be a Nextcloud server, but the backup folders shouldn’t then be included in a sync and not even be touched on the servers webinterface. Same goes the other way arround. Folders that are included in the sync have to be considered as living “server side” and should therefore also be backuped from there. You can use an external drive, a sperate NAS, or an external cloud provider as a backup target. In theory you could also use your PC or Laptop as a backup target or include the sync folder on your client to the client backups. But I would not recommend that, because there is still to much that can go wrong, when you do it like that