12
5
I'm facing a rather simple situation, I have to upload, as-is, a big tree of files to a WebDAV server that's reachable over HTTPS. I must start the upload from a linux box with command line only. I can install programs on the box.
I've tried Cadaver but it does not support recursive directory upload.
Do you know of simple tools/scripts to achieve that?
Ok, I found something that did it.
I started from the davpush.pl
script that can be found here https://github.com/ptillemans/davpush
Some changes were needed:
- replace all "
dav://
" to "https://
" - add "
print POUT "open";
" before "print POUT $script;
"
Damn, having to hack a perl script to simply upload a directory that's rude. I'm still looking for simple tools/scripts.
kio-client could have done it too. Unfortunately it's a quite restricted box and I don't have gnomevfs-copy nor kio-client installed. – eskatos – 2013-04-02T11:30:21.387
Try dave if you can. It works recursively (but unfortunately to me, it doesn't understand multistatus response from the server) – user36520 – 2013-04-05T12:07:39.057
dave did it with the target server, thanks! In fact it's not so far from what I did based on the davpush script that use cadaver itself using the perl HTTP::DAV API. But with dave, one cannot easily write a shell script with a bunch of commands because it is interactive only. Answer accepted :) – eskatos – 2013-04-05T12:13:28.150