Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I attempt to copy a folder from a webdav server to a local disk using Nautilus, it copies what appeas to be a manifest file (xml with the directory listing etc..). With cadaver I get an empty file.

I would like to be able to recursively copy a whole directory tree. Does anyone know how I can do this?

ps: I'm using Ubuntu 11.04 with Nautilus 2.32.2.1 and Cadaver 0.23.3

share|improve this question
    
Do you need a tool with a GUI or is wget "good enough" for you? –  Ocaso Protal Feb 14 '12 at 7:26
    
I had a peek at wget, and it didn't claim to do webdav... It would work for me if it did –  drevicko Feb 14 '12 at 7:35
2  
Try this: wget --user={username} --password={password} --wait=20 --limit-rate=20K -r -p -U Mozilla http://{website} If it works Ill add it as an answer ;) –  Rinzwind Feb 14 '12 at 7:52
1  
But webdav is just plain https, so wget should work. a quick google search gave me astron.nl/northstar/nswiki/lib/exe/… to get a quick overview over wget with webdav –  Ocaso Protal Feb 14 '12 at 7:58
    
interesting.. when I point it to a webdav directory/collection, it grabs the html file for that directory (ie: with the list of things there as a webpage) then complains: "localhost/webdav/calibre-library: Not a directorylocalhost/webdav/calibre-library/index.html: Not a directory". When I point it at the webdav root, its rather random... ends up starting to download the whold webserver.. Note that it's https only and self-signed, so I had to add '--no-check-certificate' –  drevicko Feb 14 '12 at 8:08

3 Answers 3

up vote 2 down vote accepted

This answer summarises suggestions given in comments by @Ocaso and @Rinzwind.

I used this:

wget -r -nH -np --cut-dirs=1 --no-check-certificate -U Mozilla --user={uname} 
    --password={pwd} https://my-host/my-webdav-dir/my-dir-in-webdav

Not perfect (downloaded lots of 'index.html?C=M;O=D' and the like) but otherwise worked ok.

The "-r" downloads recursively, following links.

The "-np" prevents ascending to parent directories (else you download the whole website!).

The "-nH" prevents creating a directory called "my-host" (which I didn't want).

The "--cut-dirs=1" prevents creating a directory called "my-webdav-dir".

The "--no-check-certificate" is because I'm using a self-signed certificate on the webdav server (I'm also forcing https).

The "-U Mozilla" sets the user agent in the http request to "Mozilla" - my webdav server didn't actually need this, but I've included it anyway.

share|improve this answer

You can use dav2fs to mount the webdav server, and then you can access it as you would a local directory.

share|improve this answer

Actually with Cadaver you can cd to directory from which you want to download files and mget *.

share|improve this answer
1  
For this to be a useful answer, you need to tell the user how to do this. –  RolandiXor Sep 25 '12 at 19:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.