Hi I am a newbe so please forgive me if I did not provide all the necessary info
Snap nextcloud lastest everything 30.0.04
Main storage for nextcloud is on a usb drive attached to a laptop. Snap Nextcloud is installed on the laptop Ubuntu 24.04.1 LTS.
Lost all files in Nextcloud on the usb after exited from Maintenance mode. Did not know why it was in Maintenance mode in the first place anyway.
Still see all files backed up by nextcloud on the USB drive in Windows PC (formatted Fat), if I move the drive to a windows PC.
Dmsg show following error:
Fat fs (sdb1) “Cant find a valid fat system”
“bogus number of reserved sectors”
This issue doesn’t look like snap or nextcloud related.
Snap / Nextcloud itself doesn’t manage file system. It is done at OS level. Snap or Nextcloud can only access what is already available at OS level. It is possibly an OS / hardware related issue.
Snap Nextcloud stores it’s database at OS Root drive so it is possibly safe at this point along with it’s configuration file.
Since your external USB disk drive is accessible in Windows PC,
backup (copy all files) the disk as it is in to the Windows PC local Drive or at any external drive.
Re-fortmat the drive USB Disk after the backup (copy) is done.
copy the data back in again in that USB Disk as it was previously (preserve the directory structure)
attach it back to your Server
remount the drive at same location as previous
reboot the server
Your snap nextcloud should be back online at this point with this reboot, in case snap is still showing maintenance mode, try to force it off with following command.
Remember, FAT file system has multiple limitations. Linux can read NTFS or its best to go linux specific ext4. Secondly normal USB drives aren’t designed to run 24x7 so ensure proper cooling for the drive for longer non stop operations. Lastly, ensure absolutely no physical disturbance for this setup, since small vibration or jerk or movement can cause USB socket disconnection and this type of data loss.
Based on your suggestions, i have decided to establish a complete new install of nextcloud file system on a fixed disk or nas. I will not use usb drive any more