Best way to upload large Linux directory to NextCloud?

I just installed the newest version of NextCloud. On our Linux-Server is a Samba share which I want to migrate to NextCloud.

Is there a console tool I could I could install on Linux with which I can upload all the files into one folder? Or what is the recommended way to upload about 120GB of data to Nextcloud?

I know I can install the client on one of the Windows clients and then just copy the files over. But I was wondering if there is a solution where I don’t need another device in the middle?

The best option is to copy the files into the structure via Linux mechanisms such as scp, sftp or rsync over ssh into the correct file structure.

  • read about Group folders and watch this video if you do not know about Group Folders
  • create the user and/or Group folders in Nextcloud GUI
  • copy the files to data/username/files or data/__groupfolders/groupid
  • change the rights recursively to www-data:www-data or your web server/Nextcloud user:group

Execute to read the new folders/files to Nextcloud database:

sudo -u www-data php /path/to/nextcloud/occ files:scan --all


If you are not sure whether you are using the correct directory, you can create a file such as within your Nextcloud GUI and search for it in the directory structure under Linux.

It is also possible to add SMB/CIFS to your Nextcloud with External Storage. But if you want to migrate everything to Nextcloud, I would advise against continuing to use it as External Storage. Replace SMB/CIFS if possible see my documentation above.

1 Like

Thanks. I didn’t know I can just copy it. I thought because of versioning etc there is a more database like structure.

I already have version 29 installed and I see that many complain about the quality of Group folders. I am not sure if I should use it now or now.

Group folders are useful if you do not want to assign folders and files to single users / single user directorys. Only admin can create and configure Group folders. But there can be more than one admin. Think about what happens when the owner of folders and files leaves Nextcloud.

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