How to recursively upload a directory to a WebDAV server through HTTPS from the command line

command linehttpswebdav

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.

Best Answer

Try gnomevfs-copy:

Edit: gvfs-copy is not recursive. I patched it but yet havi to publish the code. In the meantime, check dave from perldav. It does recursive transfers.

If you don't have fuse disabled, you can try davfs2

If you are not adverse to code your own tool, you could use gvfs and get inspiration from the source code of gvfs-copy

I'm having a similar issue, so I may come back with a better solution

Related Question