Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a local folder that i want to sync with a webdav server. There are a lot of files in my folder and i would need that after i edit some files or add/remove folder to be able to sync the changes to the webdav server ignoring what it is on the server and always using my files. Is there any script or tool that i can use from command line to do that?

And mounting the resource is not a solution.

share|improve this question
In which OS are you interested in? – Radoo Apr 12 '12 at 21:30
I'm on MacOS X, so something *nix based. I am aware about curl, or cadavre, but i couldn't fid a way so sync a whole folder. I only managed to upload/remove 1 file at a time. – daniels Apr 12 '12 at 22:01
And you don't want to mount anything from WebDAV url... Tough... :) – Radoo Apr 12 '12 at 22:11
Yes, mounting is not an option. Because if i mount i would need to have 2 copies of the same files in 2 different places and sync those too. – daniels Apr 12 '12 at 22:22
Perhaps I'm mistaking, but mounting doesn't mean copying, just linking to the WebDAV folder, everything you see on the mounted folder is what is on the server. For example, every listing you do is sent to the server to resolve. So all you have to do is just sync the mounted folder with your copy folder on disk... This is easy... google it. – Radoo Apr 12 '12 at 22:26
show 2 more comments

2 Answers

up vote 0 down vote accepted
mkdir /volumes/web_dav/
mount_webdav -s -i https://<web_dav_domain_name:port>/ /volumes/web_dav/

rsync -rvz /your_directory/ /volumes/web_dav/

umount /volumes/web_dav/
share|improve this answer

WebDav-sync is a java program designed for this purpose. http://www.re.be/webdav_sync/index.xhtml

share|improve this answer

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.