Q: WebDav access > Version control does not work?

Hi, I am curious if anyone has experience or insight on this topic. I setup a Nextcloud instance for a client last year, which is working quite smoothly for the most part. Dedicated server / good amount of resources / and I’m patching it up-to-date-latest approx 6x per year (roughly)

it is currently running latest/up to date.

most client access is via “RaiDrive” webDav client from windows workstations. This is to allow users a “Mapped drive” style access which they are familiar with while they work from home.

What I noticed today. Is that there appears to be complete absence of any ‘version control’ for all the files users manage in this manner. So for example

user Joe. Creates an excel file. Via webdav / Raidrive / mapped drive.
edits the files maybe 10 times in the day.
closes saves at end of day
next day more of the same

I would expect ideally at the least one version checkpoint for each day he has saved/closed

what I am seeing right now - is ‘no previous version’ when I drill in to the folder via web based access as his user and look at the file(s) he works with

I’m curious if
– this is a known feature, ie, you only get version control if you do web-based access, period ?
– it is a feature of how webdav is implemented / and depends on the webdav client?
– it is requirement to have more-different-better config in place which I should try to do?
– any other hints ?

Ideally if there was some way for me to make version control work with webdav it would be terribly useful

otherwise I think I need to look at implementing filesystem level snapshot / VM level backup at ~at least once if not more times per day. With ideally at least a 2-week retention window.

I’m hosting this thing as a VM on proxmox, so I’ll be able to do that. It is just kind of more-gross to do backup-and-recovery in this manner, rather than use built in version control / if there was some way to get at it that way.

so any feedback is greatly appreciated

thanks!

Tim

Can you check in the webserver logs, how such a file is handled. Are the files uploaded again, or are existing files deleted first and then the new version is pushed?

Hi

looking in apache logs, it is very (!) chatty about transactions

but from what I can tell we have a few key things going on

such things as,

192.168.93.100 - username [14/May/2021:15:55:15 +0000] "GET /remote.php/dav/files/FILENAME HT

192.168.93.100 - username [14/May/2021:16:24:36 +0000] “PUT /remote.php/dav/files/FILENAME HTTP/1.0” 201 -

192.168.93.100 - username [14/May/2021:16:24:46 +0000] “LOCK /remote.php/dav/files/files/FILENAME” 200 672

192.168.93.100 - username [14/May/2021:16:24:46 +0000] “PROPPATCH /remote.php/dav/files/FILENAME HTTP/1.0” 207 690

192.168.93.100 - - [14/May/2021:16:24:47 +0000] “HEAD /remote.php/dav/files/FILENAME HTTP/1.0” 200 -

192.168.93.100 - username [14/May/2021:15:58:09 +0000] “PUT /remote.php/dav/files/FILENAME HTTP/1.0” 201 -

192.168.93.100 - username [14/May/2021:16:01:07 +0000] “PUT /remote.php/dav/files/FILENAME HTTP/1.0” 204 -

so it appears the webdav client is doing GET and PUT and LOCK and PROPPATCH and to a lesser extent HEAD as the commands to the remote.php webdav tool

I think

let me know if this makes sense / and what scenario(s) you can see in terms of how this might impact versioning?

ie, if the remote.php webdav implementation ? supports versioning? but only if files are accessed in a precise manner (?)

Thanks!

Tim

No, I just thought if they are deleted first, or a current version is saved under different name first and then overwrites the current file, the history gets destroyed. This could depend on the transfer client but as well on the programme used for this file types.

Versioning of textfiles works for files just edited in the web-interface? If you change the tex-file on the desktop and update via the transfer client, does this preserve the versioning?

Hi, thanks for info!
I just did test quickly via web access to nextcloud
create new directory called ‘test’

create new text file ‘test.md’ in here

edit it via web interface

save/close

open file again

add one line, close text file

do it one more time

then drill into details>versions and I can see 3 x versions available to me, ie original, change1, change2

so versioning as a baseline via this kind of access seems to work as expected

I will do a test shortly with nextcloud sync client to see how it behaves. will reply shortly.

thanks,

Tim

Hi,

small footnote,

just installed latest nextcloud win10 client app

linked it to the admin account on this nextcloud server

told it to not pre-sync anything

created new text file from windows in my visible nextcloud folder, small text content

then confirmed it was visible in webUI nextcloud as same user

then made small edit, added 1 line text to file

had to wait about a minute or two for the revised version to sync down to my win10 laptop

after that, open edit file on win10 side, add another text line to file

close save

then confirm in webUI it sees the change

check the details>versions and we have multiple versions logged/visible under version control

so. this is what I might call ‘expected/desired’ version control behaviour

I am not sure if there is anything I can do to force/enable WebDav client to get similar behaviour?

part of the challenge here for this client site. is they have a requirement that data files cannot be synced down to workstations; they must remain on the nextcloud server and be edited via means that don’t pull long term copies to user workstations. hence the webdav based access.

I’m not clear, as I have not actually installed nextcloud client/latest/recently. It appeared to ask about using ‘virtual files’ instead of doing sync. I’m not clear if this is now an option to use nextcloud client entirely with ‘cloud only file access’ and no local copies saved. ie, this mihgt mean we can move away from webdav acceess for this client (?)

(or maybe not … ? )

anyhow.

any further comments or feedback are greatly appreciated.

Thanks,

Tim

(* footnote to mention. I had originally settled on using RaiDrive as webdav client - purely because it seemed to work reliably, was easy to install, and gave consistent user experience. I wasn’t specifically set on it exclusively / rather it was seemingly the best option at the time when I setup this nextcloud box for this client. The main requirement being - client for win10 laptops; ease to use /consistent user experience. Clearly the built-in win10 / default webdav client is ‘functional but generally terrible’ in my experience, which is why I did not use it as the default.)

Well can you do some edits to the existing textfile via webdav and see what’s happening? Versioning should work…

Yes, this is a desired feature that was added with the latest version. It’s the first point release, please check it out if it suits you, if you find bugs and error, please report to github.com/nextcloud/desktop/issues. Eventually, it should replace existing (mostly paid) third-party solutions.

Hi, thanks for added followup.

Currently for sure, RaiDrive WebDav is not doing things in a way that allows nextcloud versioning to behave in manner I might have hoped (ie, which would be - kinda- same as if I make edits via web-text-editor, which does do versioning nicely)

As a sanity test, I installed a trial version of “MountainDuck” webDav client, which I read about also in the support forum as a ‘good option but not free’ as a webdav client

it appears to behave in same manner as my test with Raidrive, ie,

  • versioning does not appear to work, ie, nextcloud fails to capture ‘version’ changes when I make edits to file via MountainDuck WebDav.

  • but I can see the changes to the file if I look via webUI after making edits via MountainDuck on my laptop. just no ‘version rollback capture’ checkpoint.

I did read a tiny bit more about the new-integrated feature in nextcloud client re: Cloud-only. I maybe shot myself in the foot, as I found an announcement for the feature that implied it was still in preview (approx 1 year old) so I downloaded and installed that; and had trouble with it. ie, could not see how to setup a ‘vritual drive’.

I think I will test again now, remove all nextcloud client / virtual drive client pieces. Try to clean things up back to ‘clean slate’ on my laptop.

Then reinstall latest nextcloud client

and see if I can figure out the ‘virtual drive’ feature for cloud-side-only-edit. To see if it is clear to me how to do this / and then will test if it behaves as desired.

will followup in a bit.

thanks!

Tim

Footnote,

On my win10 laptop, where I am doing testing - I removed all traces of nextcloud client and year-old virtual drive test. Rebooted. Clean install latest nextcloud

then configured it to ‘sync nothing’ and then managed to find the place to enable the ‘virtual drive’ behaviour for the folder linked with nextcloud.

it appeared to take about ~10+min to do some kind of ‘file review / properties cache?’ but claims no local space is used with this (more or less) once done.

once finished I can see nice windows explorer view of the folder / subfolders. With nice little cloud icons to hint that things are ‘cloud side storage, not local’

I then created test file locally (text file)

waited a minute, it showed up in web-client side view

edit in webclient side view, made a change, added one line to end of file

windows side it appeared a bit stupid about picking up the change (no push notify?) - I waited a few minutes, then edited file, it showed me only ‘prior state as per original file version, not the web-side edit extra line version’

once I did that, it triggered a ‘conflict resolution’ request in the nextcloud client. I told it to keep the cloud-copy / dumped my local edit / got the cloud-side edit visible.

then re-did the local edit.

then went back to web client view. could see the changed file content.

very nicely I can also see that changes made via laptop nextcloud access do appear to trigger ‘version control’

which is great

only wrinkle now that makes me a tad anxious. is when I delete the file from my nextcloud client view on laptop. It disappears. And then re-appears after 30 seconds.

if I try to delete this test file via web-side view. It just gives me error in top-right corner, “error deleting test-file.txt”

and that is that. I can’t get rid of this file?

I waited 30m, ignored it, closed out nextcloud client on my laptop to make sure no ‘active sync process’ issues.

tried again to delete the test-file via web view nextcloud, and same error persists.

I’m not sure if this is known behaviour, ie, some weird things may happen?

overall the ‘virtual access’ with no-sync-files to local nextcloud-on-windows - seems really nice / and very good

possibly could be bit smoother in terms of the sync push in case of changes made Cloud > push down to laptop/windows client (?)

and something? weird? with delete file for some reason

if this is a bit more solid I think I’ll be moving clients over to this instead of webDav RaiDrive style access

but I’m not sure it is quite there yet

anyhow. wanted to share these findings in case this info is of any use / interest

thanks!

Tim