New data on datadir not detected

Nextcloud version: Nextcloud All in One latest on Docker Desktop
Operating system and version: Windows Server 2022

I have a secondary drive on my server with the letter L: as my C drive is is very small, so I want to have all my nextcloud data on it. Therefore, I used the following commands to create my nextcloud instalation:

docker run ^
–init ^
–sig-proxy=false ^
–name nextcloud-aio-mastercontainer ^
–restart always ^
–publish 80:80 ^
–publish 8080:8080 ^
–publish 8443:8443 ^
–volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
–volume //var/run/docker.sock:/var/run/docker.sock:ro ^
–env NEXTCLOUD_DATADIR=“/run/desktop/mnt/host/l/Docker/Nextcloud_data” ^
–env NEXTCLOUD_MOUNT=“/run/desktop/mnt/host/l” ^
nextcloud/all-in-one:latest

It all works fine, except one little detail, if I go to my Nextcloud datadir (L:\Docker\Nextcloud_data) and place files for one user on file explorer, nextcloud does not know they are there, is there any way to fix that?

Sorry if my english is bad, it is not my first languaje

Is L:\Docker\Nextcloud_data being synchronised with your server? or is it just YOUR shortcut to a mounted drive inWindows.

Not being an expert in anything, I’ll wager that any contribution of files to Nextcloud have to be accompanied by an SQL instruction to the database that keeps track of file locations

My thinking is: If you’re adding files directly to a folder that is either on a Windows share to directory on your server or doing it via Windows Explorer, then Nextcloud server is not getting enough information to store this correctly. Still, being new to this, I don’t know if Nextcloud has a sort of ‘garbage’ collection method that could pick up on such data…
Confused? Me too…

English is not my first language either… Keep on chooglin’

Hi, new data in the datadir is not automatically picked up by Nextcloud. You need to run the files:scan command in order to do so. See Using the occ command — Nextcloud latest Administration Manual latest documentation

Thank you very much, for me it was a little bit different cus i am using docker, but with that in mind i was able to do it in cmd with this command

docker exec -u www-data nextcloud-aio-nextcloud php occ files:scan --all

1 Like

Well, the L: drive is just a second drive on my server, and I tryed adding files from an SMB share of that drive and directly on my server’s file explorer but either way it did not work, but just as mentioned by [szaimen] it was matter of just using a command for nextcloud to detect the new files on that folder

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.