Blog => Blob => Jello

Random Stuff.

Mass uploading files to ownCloud (the easy way)

icon 2014-10-06 - No comments

In my previous post, I've described a kinda complicated but command-line based user-level way to mass upload files to ownCloud, using the cadaver WebDAV client.

Well. Erm... There are WebDAV filesystems implementations out there. See ?

$ yum search webdav|grep -i filesystem
davfs2.armv6hl: A filesystem driver for WebDAV

So I did yum install davfs2-ed, and that just worked. And I've configured davfs2, following a tutorial like these one is fine enough:

Note that disabling locks is indeed required for ownCloud, so I needed to edit davfs2.conf
use_locks       0

After a mount /mnt/owncloud to locally bind your ownCloud webDAV to a directory, to make recursively upload a full directory tree, it is easy as this:
rsync -vr --progress --bwlimit=123 /path/to/my/directory/. /mnt/owncloud/my_sub_dir/.
In case the rsync stops in the middle of the upload, the command line can be entered again to resume the upload.

So, no cadaver, no shell dark magic, just a mount and an rsync.

icon Tags de l'article : , , ,