Just writing to warn other people about what could happen, I don’t have any faith about recovering my files (well, actually yes, but in a non-perfect-way).
First of all, the details of my Nextcloud installation:
SO: Debian 12
NC version: 28.0.5.1
Type of installation: Docker Compose
Container images:
- mariadb:10.11
- nextcloud:stable-fpm
- nginx:alpine
- redis:alpine
- lucaslorentz/caddy-docker-proxy:ci-alpine
The situation is simple. The installation has been working fine for a year or so. Yesterday I wanted to update (as I did 5 or 6 times before) so I used watchower to check for any update for the docker images and it did the job (as always) and updated all the images. After updating I ran the scripts that installs SMB into the container so it can access one NAS (the other 2 are mounted using NFS in the host SO so they were already accessible). Then I rebooted Nextcloud container to enable the SMB acess to the third NAS and checked that the web interface was working fine but it was throwing a 502 error. Went to the container logs and it kept saying:
Initializing nextcloud 29.0.6.1 …
Upgrading nextcloud from 28.0.5.1 …
rsync: [generator] delete_file: rmdir(backupsnas12tb) failed: Device or resource busy (16)
Then I went to the NAS to check that everything was ok and then realized that this folder (backupsnas12Tb) was completely empty. At first I thought it was an error, but after some time I was sure that everything (3Tb of docs, videos, photos, etc) was gone.
In this moment I heard the disks of the other NAS with NFS access from Nextcloud spining up and after checking it, half the folders inside this folder was also gone. I inmediately shutdown Nextcloud VM to avoid losing more data and just confirmed that it also deleted half of the information in this NAS.
I’m not sure why that happened. I’m pretty sure I didn’t do anything wrong because I followed the same procedure as before. Maybe something changed in this version regarding the updates or maybe I didn’t configure the access to the folders in the right way, the only thing I’m 100% sure is that from now on, Nextcloud will be a forbiden word in my house and of course, never again will deal with it.
After that I took the disk from the NAS and used a data recovery software to recover the information, but of course, every single file now it’s called “lost name file (1)”, “lost name file (2)”, etc. What a nightmare…
If somebody experienced something similar, I would love to know the reasong why that happened and if any of you know about any data recovery software that could recover the entire folder tree with the original names.