Recently I transfered a lot of files into Nextcloud. I was cautious of the upload integrity so I really wanted a way verify that everything had uploaded correctly before removing the local copy from my device.
I didn’t really trust the Nextcloud client sadly after it had some weird errors like invalid file names and asking to sync directories I just synced, with no visible log of what didn’t upload correctly… 1
Instead of using anything within Nextcloud itself as the tooling seemed lackluster, I reached for the amazing rclone to do the heavy lifting.
My webdav configuration was:
[nextcloud] type = webdav url = https://[ domain/path ]/remote.php/dav/files/[ username ]/ vendor = nextcloud user = [ username ] pass = [ password ]
Note that the rclone url is not just the domain name, you need to supply the WebDAV path - click Settings in the bottom left of your Nextcloud Files view in the web interface
You may need to create an application password if you use 2FA in Nextcloud or you will get unauthenticated errors.
Now with that all configured, you can run
rclone check on your directories like so:
rclone check nextcloud:Your\ Directory ~/Nextcloud/Your\ Directory --progress
This will do a full hash check of each file and alert you if any are missing with a message like
2020-08-27 00:00:00 ERROR : File/Path/Example.txt: File not in webdav root 'Your Directory'
If you have a lot of files to check and don’t need as much accuracy, add the
--size-only flag to the end to skip hash checking and use file size instead.
This process gave me the confidence to remove my files locally and trust in the Nextcloud server actually having my data. I hope this helps someone else out there with the same issue.
Nextcloud really is great and I can happily recommend it to anyone trying to free themselves from large corporations holding their files, or those of us that need a lot of space. Its an example for how open-source products can provide a trustable, free alternative & competitor to existing products.
I did find that there is a log if you open the settings menu and press f12, no good to me later on though and it is a full application debug log, not a file sync status log ↩