One way sync from Windows Network File Share to Nextcloud Group folder

Hi,

I would like to copy files from a Windows network file share to a group folder in nextcloud, on an hourly schedule so when the network files are modified a new copy is sent to the nextcloud folder.

I am unable to connect from a windows server 2019 via webdav, and can’t figure out another option to establish communication between the servers.

Please let me know if this is possible.

Thanks.

The WebDAV can be done but it is sometimes finicky on Windows.

Alternatively, you could set up a SMB share as external storage and assign it to the Nextcloud users who need it. They can access the files directly from the Windows server via Nextcloud with no need to copy them to the Nextcloud server.

I use open media vault which basically creates a large Samba share. I have windows server 2019 map this network drive (M:) and that is what nextcloud uses to sync.

I am having some issues with my nextcloud at the moment (to do with ssl) but I think they are unrelated.

@KarlF12: I have some SMB shares for other uses, but we need to select only certain files to share, not a whole drive/folder.

@nixius: First I have heard about Open Media Vault. From a quick review, I would create a OMV server with sufficient disk space, sync the files from the network to OMV. Connect the OMV to Nextcloud as external storage to share. Is that correct? Does this setup allow us to manage the shared files permissions individually? We have many folders that have specific permissions.

Thanks.

Do you mean that you only want certain files to be present in the Nextcloud group folder, or that you want to be able to share specific files from Nextcloud? The latter wouldn’t be an issue.

Back to your original question, I have used WebDAV mapping from native Windows 10 before, and it does work. The issue I ran into was more that it would seem to disconnect after a while and not reconnect smoothly. I think I also had to use net from cmd to get it to map right.

I play media from Nextcloud in Kodi with its built-in WebDAV client on a daily basis and never have any issues, so I don’t think there is any issue with the Nextcloud side of it.

One other thought, and this is kind of an odd way to go about it, but maybe it would work for you. Could you set up a samba share on your Nextcloud server, mount it from Windows to copy your files, and also mount it as SMB or local external storage from Nextcloud? That would eliminate the need for WebDAV.

I wanted to copy the files and folders onto the Nextcloud drive so I could manage the sharing permissions via NextCloud.

WebDAV on Windows can be messy. That is why I was looking for an alternate, or a solid way to connect with webDAV.

Creating a samba share might be worth trying.

I inherited an old server from a friend who help me set it all up, so I will be as detailed as I understand my own setup! Everything I run is a VM via VMWare.

I have one VM that runs OMV, this uses my disks (Raided to be a single 6TB ‘drive’) to create a single folder I call ‘Files’. Inside ‘Files’ I have things like Documents, Music, Pictures etc. Different VM’s consume different folders as desired. This configuration could be much different if you wanted. Maybe you could spin something up to take a look at the options?

Anyway, ‘Files’ is configured to be a samba share. OMV can do lots of things with user permissions, groups etc but as this is for home use I don’t use anything like that.

The next VM you may be interested in, is my backup VM. This runs Windows Server 2019 and has a mapped network drive as M: that points to \PCName\Files\Music. The same VM runs NextCloud which synchronizes, in this case, M:

The more I read over my answer and your question, I start to think maybe my solution isn’t quite right for what you’re doing? But I do hope this helps somehow.

Anytime I have used WebDav has, honestly, been miserable so I wish you all the best

You could mount the windows network share via fstab an run a bash script hourly via cron that copies all changed files to the correct groupfolder. This script could then also trigger a rescan of the groupfolder.

BTW: don’t you need two-way-sync?