Move files from local filesystem to nextcloud?

Hi,

I have a whole bunch of files on the local filesystem, meaning on the same server as nextcloud server is installed. I moved some files to one of the users folders, adjusted file permissions and ownership ( 0755 www-data:www-data) but the user is not able to see those files. Is it just tough luck or is this procedure not supported? If so, how do I get arround 250GB OneDrive For Business Data into one nextcloud account? Thanks

You need to scan the folder if you have moved or copied files into it at the file system level.
Nextcloud need to generate the information about files and directories into the database.

occ files:scan $user_id$

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#scan

Thanks. That looks straight forward. I will give it a try. Is $user_id$ just the user Name?

Yes, except you are using an other user provider like LDAP.

You can also scan all files, like so:

sudo -u www-data php /var/www/nextcloud/occ files:scan --all
1 Like

Worked out well. Thanks

Any hint how it works when LDAP is used?

Is it something like occ files:scan --path="user_id/files"? But then is that the absolute path?

Background, I want to add 700 GB of files to one user and prefer not to upload them via any Nextcloud tool, but have them already uploaded to the server by rsync.

Edit: m(

Got it, just relative path in enclosed in double quotation mark works. So just like above occ files:scan --path="userfoldernemae/files" and files is mandatory.