The WebDAV is dead, long live the rsync!

Sat, 8 Jun 2013 (tags:linux, windows, office, wine, rsync, webdav)

I have bean in love-hate relationship with WebDAV for some time and I decided to brake up with her and replace her (pretty sane sign that I'm referring to technology to as a person). I had multiple shares and this particular one was used for MS Ofiice OneNote synchronization, and got replaced by rsync (for others there will be another articles)  Couple things I really loved about WebDAV, but there were some I really hated.


  • When it worked, it worked pretty nicely.
  • That's all, but I loved the part when it worked. (integrated inside the onenote, automatically synching as you were typing the notes, it was nice)


  • When it didn't worked it was PITA to live with
    • 2 times I got failures where I was forced to find latest backup, re-synchronize everything from scratch. It was over period of 2-3 years what maybe is not so bad, but for me to have confidence and peace of mind about my data and notes is somehow not enough.
    • Other cases when it just refused synchronize for some reason and I was in read-only mode till I found a part of mine notes which it magically didn't liked and I have to get rid of it or I wouldn't able to continue. Even though it was used as 1 way backup (to have it working as 2 way synch there was another problem, will be mentioned below). Still I had to suffer problems as 2 way sync. When I couldn't not upload some tabs and got flagged as un-syched, it was expecting that something could changed on the other side and to prevent creating a conflict it limited me to the read-only for that tab. So if there was some problem I couldn't continue to work on my notes properly till the problem got resolved. So it was overkill for somebody who was alone working on his notebooks, no collective cooperative editing of notebooks, still I had to live with quirks of such system. Maybe if I will need it in future I will give a try to Office Web Apps and skydrive.
    • Used implementatio
  • To have working 2 way synch I needed to have it working on my Linux desktop. Because it uses MS implementation of WebDAV which is installed with Internet Explorer (Web Folders component) for older systems. And newer system it had implemented as build-in. Which behaved differently of the older implementation so it was extra set of workarounds on server to get it working, plus specially some extra just for the office, because he liked to do something extra something different just for fun. End story short, I didn't managed to get installed anything that the build-in API of onenote could recognize and use. And after some time I just gave up. When you have normal onenote notebook it is directory with files corresponding to your tabs. When you have synched notebook it's in some obscure way, in a cache directory, you have no clue what file is what. I ended up to use build in backup to get the regular files and then opening them on mine Debian. But the I was somehow in read-only mode in linux, or even worse I could make changes but no way to synch it seamlessly back, so I always lost data if I forgot that for moment.
  • I do not remember it clearly but WebDAV itself has in RFC specification to try lowest privileges possible I think? The problem arises that I have server protection regarding all places and services where can by any kind of password access. And after couple tries it blocks your IP for couple minutes, then for longer etc... And WebDAV behavior quickly tripped this mechanism even tough you had real clearance. And required workarounds, and lots of other things made just to get it work somehow, didn't gave me the most robust feeling. Plus it did more request than it was necessary, it was little bit slower than it could be using  more efficient protocol.
  •  I had WebDAV server side done by SabreDAV, which gone a lot of troubles to make it compatible as possible. 97% unittest coverage and special workarounds for new/old windows clients and for office some extra too. Even reading trough the authors torments when he found that XML controll messages with some MS products are sensitive for white characters, especially on such places where XML shouldn't be. Really SabreDAV is nicely done, but because lot of things required to keep it working I got afraid to do something on server side, update mine Office and I was worried with system updates on client as well, reading if they could affect how the WebDAV implementation works, just if it could break mine setup.
    • SabreDAV is done in PHP, side eeffects of that is that larger files could get terminated by PHP timeout, but still having the locks present in database, then manually cleaning database and playing with stuff to get permissions to save the file to the WebDAV at all.

So most of time I had worries in my back of the head to make big notes, to keep server setting unchanged and lots of other things just to not give it any reason to break. Because when it broke my productivity dropped. Then the Linux side didn't worked as I wanted and I had mixed feeling about whole time, even couple things I loved very much. It was time for change, couple years back I evaluated mine options for note-taking software. I had no prejudice and was willing to use what will do the trick for me and OneNote fits me very much. So still I kept the OneNote a changed the synchronization to something more awkward, but more suitable for mine needs. And having MS server solution is overkill, waste of server resources and still will not be without any issues and won't solve all mine problems.

Switching from build-in support to 3th party synchronization meant that OneNote:

  • Kept his files in normal mode, so now mine Debian can access to it as to normal files. They are not virtual machines and I'm rebooting when I'm switch between them. Therefor there will be no "synchronization conflicts", only one of them will access and change files at one given moment. This solved problem with mine Linux like the problem even never existed.
  • Had no clue if he is synchronized or not, so it doesn't go into the read-only lockout. If somebody needs 2-way synch it's not the best, but it's ideal for somebody who needs the synch as 1-way backup (because synching with linux solved by itself). If I'm offline for prolonged time, mine service will not work or break I will have peace of mind that mine note taking will not be affected.

Notes goes to server (backup) and then at night to the backup server of that server (backup of the backup), which means that mine notes are on 3 different hard drives in 2 different countries. Plus the backup server for my server keeps daily and weekly increments and I can revert changes, something deleted 2 months ago and regret it, I can get it back, It's like personal automatic revision control.