You are not logged in.

#1 2013-12-05 22:35:15

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,042

[solved] Request for ideas: fast syncing with owncloud

So, here's my problem. I have OwnCloud set up on a shared server and I generally like it. I use davfs2 to be able to access files stored in owncloud locally on my computer. That works, however it's slow as hell: opening or saving small text files files takes upwards of a second. Completing file names in Bash has a similar delay. So, I had the idea that I would mount the WebDAV in some hidden folder and then locally sync between the desired directory and the hidden mount, via a cronjob or (better) by monitoring for changes in either directory. Then, I can just edit the files locally at normal speeds and then those changes would be periodically synced with the server. Any changes made on, say, my work computer, would then be synced into the local directory on my home computer. This means that I would need local, bidirectional syncing between the two directories, while owncloud's WebDAV implementation would handle syncing with the server.

So, something like:

1. mount owncloud webdav in ~/.local/share/owncloud
2. sync files to ~/owncloud
3. edit files
4. sync files back to ~/.local/share/owncloud
5. edit files on some other computer
6. sync files to ~/owncloud

So, I thought that rsync might be the right tool, but that seems to be unidirectional (correct me if I'm wrong): if I change a file in ~/owncloud, then rsync would update ~/.local/share/owncloud to reflect the changes, but then remote changes that get pulled in via WebDAV won't be updated in ~/owncloud (or vice versa, depending on which directory is the source and which is the destination). Then I found out about csync and, more specifically, ocsync (the owncloud-specific fork of csync). It sounded like it should be able to handle this bi-directional updating but when I tried it, it also was unidirectional.

Now, I don't want to get into manually comparing file modification times and such, since that's what rsync and (o)csync are supposed to do. But, for some reason they don't. So, my questions are:

1. Am I missing something in the rsync options that would let me do this? If  a file is newer in the WebDAV, it should be updated in ~/owncloud; if it's newer in ~/owncloud, it should be updated in the WebDAV drive.
2. Is there some other, better way to do this? How have other OwnCloud users achieved fast file syncing similar to Dropbox's?

I cannot use OwnCloud Client because it expects a tray, which I'm not running.

Last edited by jakobcreutzfeldt (2013-12-06 15:50:32)

Offline

#2 2013-12-06 00:51:32

lothar_m
Member
From: Cyberspace
Registered: 2010-04-25
Posts: 32

Re: [solved] Request for ideas: fast syncing with owncloud

You may take a look at unison. i do believe it's bi-direcional.
http://www.cis.upenn.edu/~bcpierce/unison/


“Clearly, Field Marshal Haig is about to make yet another gargantuan effort to move his drinks cabinet six inches closer to Berlin.”

Offline

#3 2013-12-06 10:06:58

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,042

Re: [solved] Request for ideas: fast syncing with owncloud

Ok that looks good.  I'll try setting that one up. Thanks!

Edit: perfect. It does exactly what I want.  Thanks!

Last edited by jakobcreutzfeldt (2013-12-06 15:50:53)

Offline

Board footer

Powered by FluxBB