Files vanised, cannot restore snapshot and messed up datadir

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


Or for longer, use three backticks above and below the code snippet:


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, 20.0.5): NextcloudPi version v1.53.2
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 11. 6.1.21-v8+ (aarch64)

The issue you are facing:

The main issue is that part of my stored files vanished, without a trace. No trace of them in the activity or trash.
The second problem was that I couldn’t restore btrfs snapshot, it said: ERROR: Not a Btrfs subvolume: Invalid argument
Well, then i did something stupid with nc-datadir and now I get stat: cannot statx '/media/myCloudDrive/ncdata/data': No such file or directory
Now I lost all access to he nextcloud, webapp says Error: Your data directory is invalid Ensure there is a file called “.ocdata” in the root of the data directory
At this point, I am lost.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


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

cant find it

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



Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


Are your files stored on an external drive and if so, is that drive still mounted?

Yes, on the external drive and I think it is mounted. (lsblk finds it). Although, there is no mountpoint listed. I have automount checked.

If no mountpoint is listed, it’s not mounted.

Now I have it mounted: /media/myCloudDrive
Still can’t restore files. Now the error is: ERROR: not a btrfs filesystem: /media/myCloudDrive/…/ncp-snapshots (It was btrfs)

I’m a bit panicked. I just want to restore files now, is there a way to do that? I tried disk drill, but it doesn’t find folder structure.