#acl PaulHowarth:read,write,admin,revert,delete All:read === Tuesday 17th February 2009 === ==== Fedora Project ==== * Updated `gtkwave` in Rawhide to 3.2.0 ==== Local Packages ==== * New package `fuse-davfs2` * Updated `curl` with patches from Fedora to fix NSS support; `curl` is now built using NSS rather than OpenSSL again for releases that support it * Updated `gtkwave` to 3.2.0 * Updated `perl-Params-Util` to 0.38 ==== Creating a Local Mirror of a WebDAV Site ==== I have over the years helped to maintain the [[http://www.mcivta.com/|Manchester City Supporters' website]] in conjunction with [[http://www.hanssen.priv.no/svenn/|Svenn Hanssen]] at the University of Tromsø. This has been an ongoing project since 1994 and our methodologies reflect that - Svenn does most of the maintenance and I keep a local mirror of the site and push my updates after I've made them. I used to use the traditional `mirror` script to pull my local copy from the site's FTP server, and later switched to using [[http://lftp.yar.ru/|lftp]], still using FTP. However, late last year the site moved over to using WebDAV rather than FTP for upload access, and this proved to be a problem for `lftp`; although there is support in `lftp` for WebDAV, it appears to use index pages served out by the web server rather than the WebDAV indexes, and thus doesn't see the whole site (and gets very confused by broken links but I need to fix those anyway). So I've been using [[http://www.webdav.org/cadaver/|cadaver]] to upload my files and not resyncing back Svenn's changes for a while. Today I tried a different approach, and it works very nicely. I used [[http://dav.sourceforge.net/|davfs2]] to mount the remote site as a local filesystem and then used [[http://samba.anu.edu.au/rsync/|rsync]] to update my local mirror. Not only does it work well, it's much faster than my old `lftp` approach :-) I made `fuse-davfs2` packages for Fedora 9, 10, and Rawhide based on some old packages from [[http://dag.wieers.com/rpm/|Dag's repository]]. Having installed that, I then set up the configuration files I needed, namely an entry in `/etc/fstab` for the mount: {{{ https://webdav.example.com/ /home/paul/webdav.example.com davfs noauto,user 0 0 }}} and a credentials file `~/.davfs2/secrets`: {{{ /home/paul/webdav.example.com username password }}} The `~/.davfs2/` directory is mode 0700 and the file `~/.davfs2/secrets` is mode 0600. I then added my account `paul` to the `davfs2` group: {{{ # usermod -a -G davfs2 paul }}} I could then use this script to update my local copy of the site: {{{#!format plain #!/bin/bash # Exit on failure set -e echo Mounting WebDAV filesystem mount /home/paul/webdav.example.com if [ ! -s /home/paul/webdav.example.com/index.html ]; then echo "sitesync: index.html missing from remote filesystem - aborting" 1>&2 exit 1 fi echo Syncing data from WebDAV filesystem to local copy rsync -av --delete /home/paul/webdav.example.com/ /home/paul/mymirror echo Unmounting WebDAV filesystem umount /home/paul/webdav.example.com }}} {i} Since writing this article, I have renamed the `fuse-davfs2` package to `davfs2`, as that is what the software is known as upstream and, as of March 2009, in Fedora. ----