Missing Files After Manual Copy

Nextcloud version (eg, 18.0.2): 20.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.1
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.1): 7.4.3

The issue you are facing:

I am new to nextcloud and I just set up a server for personal use. I have a large number of files I want to transfer. Instead of uploading/syncing these files, I copied them directly onto the server hard drive.

I copied the files from an external hard drive to /data/nc_data//files/Documents/

The process was super fast, but I don’t see the newly copied files on the web interface.

I have confirmed that the files were successfully copied and that they are in the correct directory. So why aren’t they shown on the web interface?

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

I face the same problem: after deleting directories on external HDD used as external storages and recreating them by synchronizing with directories on my internal HDD, I just can’t view them, although they ARE on external HDD and all accessible.
Has anyone a clue ?
Thank you

This is because Nextcloud doesn’t know the files exist. You need to add them to the database using the files scan command.

sudo -u www-data php occ files:scan --path "user_id/files/my_manual_files/"

Ideally you should set up an external storage for manually manipulated files

Thanks, it took a little finagling, but that worked!

1 Like