Sync to local folder

I think it would be useful to have a feature to sync to a local folder in addition to a WebDAV folder. WebDAV is harder to come by these days, especially one that works properly with Zotero (initially it looked like box.net would do the trick but it has its issues).

The advantage of syncing to a local folder is that that folder can then be synced between different computers using a variety of free or cheap alternatives which provide folder syncing: dropbox, skydrive/live sync, wuala, box.net, etc.

I understand that you can always use these tools to sync your data folder, but it seems that using the WebDAV sync would be a safer alternative which is less likely to cause catastrophic damage to your library and also appears to offer at least some rudimentary conflict management.

Thanks.
  • if all you want is to place a mirror image of your storage folder into dropbox et al, you don't need syncing, symlinks will do (i.e. place asymlink to your storage folder into your dropbox/sugarsync etc.folder:
    http://en.wikipedia.org/wiki/Symbolic_link
  • No, I don't want to mirror my storage folder or sync my storage folder. I COULD do that, but as Zotero isn't setup to deal with the potential conflicts that could occur if you don't make sure only one instance is ever running, it seems dangerous.

    What I'd like is to use Zotero's syncing feature, which allows syncing of attachments to either Zotero's own server or any compatible WebDAV server, but for there to be a third option to sync to a local folder. This would allow one to sync as if they were using a WebDAV server, without the requirement of actually having a WebDAV server.
  • edited November 7, 2011
    DrRZ: You misunderstand adamsmith (or Zotero). He's referring to the 'storage' directory, not the data directory itself (which includes the database). Subfolders of 'storage' have unique keys, so there wouldn't be any danger of conflicts.

    What you're asking for would be a waste of development time.
  • You're right, I misunderstood. In all the threads I'd looked at about syncing, I actually didn't notice anything about the Storage folder (as opposed to the main library folder). But after reading your responses I found this thread: http://forums.zotero.org/discussion/8463/ which suggests it probably works okay.

    So is there any technical difference between syncing your attachments by syncing the Storage folder versus using a WebDAV server? Is there any issue with Firefox or Zotero being open on multiple computers at the same time? Is conflict management any better over WebDAV?

    Thanks!
  • This isn't something we've officially tested, so I can't really say for sure, but I can't think of any real problems with it. Having Zotero open on both machines shouldn't be a problem if you're not syncing the database itself.

    As for conflicts, that depends on what exactly Dropbox does. With Zotero's file syncing you'd see a conflict resolution window (though it doesn't currently let you inspect the two files). I think Dropbox silently saves both files in conflict to disk, where presumably for Zotero files it would be very hard to notice the conflict, but I'm not sure.
  • to avoid disaster, let me just emphasize again that you need to do this with a symlink - afaik this is the only way to get the 'storage' folder into dropbox* but _not_ the 'Zotero' folder.

    If you do that, no, there is no issue with having FF open on several computers at the same time. Conflict management is not something that will come up often - only when you modify a file attachment at two different locations and then sync dropbox- I would think that dropox's conflict resolution kicks in then, but I also would think of this as very rare.

    Technically the two are different, yes, the main advantage being that items synced to WebDAV are more closely tied to the Zotero database online. Using the phpZoteroWebDAV script (http://forums.zotero.org/discussion/20339/phpzoterowebdav-20-php-based-webdav-server-and-library-and-attachment-viewer/ ) you can, e.g. view attachments online. It may(!) also become possible in the future to attach files to Zotero items via API using WebDAV etc.

    In short - if your only goal is to have your files available on multiple computers, there is no practical difference. For more complex use cases, yes there are technical differences and advantages to WebDAV (and even more advantages - file sharing in groups, accessing attachments online on Zotero.org etc. - to Zotero Storage).



    *I use drobpbox as a stand-in for all comparable products.
  • There is another way to achieve this. That is to use firefox addon zotfile, which can move all attachments to a dropbox folder and make a link to those files.
  • MG6
    edited April 24, 2012
    I can think of a problem with this idea: Dropbox's conflict resolution is not as forgiving as Zotero's. If you make a mistake, it will be pushed to all running machines automatically. You can disable this--but why would you?--and the system keeps copies of your deleted files for some period of time, but I still wouldn't risk it. Depending on when you made various edits to two versions of the same file, you may lose the local copy with the most work (it's cloud, not local versions that backup!), with no confirmation dialog, and no way to go backwards. This has happened to me while editing a file on the Android client. I should have known that the mobile client doesn't upload by itself, but there is very little user control over the basic system. Poof. Gone.
  • edited November 20, 2012
    At work, we have PDFs centrally on the network and we are not allowed to sync with the cloud.

    If I add an item and the link to the PDF in my Zotero database, I would like to have my colleagues to be able to see these entries into their database, too. It would be even better if all worked on the same database.

    Working on the same database seems not possible. We tried it and Zotero does not open as soon as somebody else has his Firefox with the common Zotero storage path open.

    Exporting via Group will not transfer the link data or does it? (and is not allowed in our plant).

    Isn't there a sync option to network path? Why has it to be WebDav?
    Any solutions welcome.
  • You'd have to have the ability to sync data locally, which is rather involved. The Zotero server code is available online:
    http://www.zotero.org/support/dev/dataserver_setup
    but setting it up isn't trivial and not supported - it's been done, though, and if you have a dedicated IT person it's certainly viable for a company.
    That's the only option that doesn't involve syncing the database to Zotero, though (even if you were to set up WebDAV locally - which is easy - you'd still be syncing the database to Zotero).
  • edited November 21, 2012
    Thanks a lot for the timely and straight answers!

    The local server installation seems too much effort and requires to involve too many people here.
    It would be a straight feature to provide synching to a network directory, though. The principle to have the data all at Zotero makes me thinking.
  • Exporting via Group will not transfer the link data or does it? (and is not allowed in our plant).
    Group sync does not allow attaching links to files, so you're right that this would not work. Your case is rather special, since local file links would likely stay consistent across multiple computers on your local network, but in most cases, local file links would break.

    I'm a little surprised that the link itself cannot leave your local network. I can't imagine the path to the PDF containing any more sensitive information than the metadata itself. Or is the metadata not allowed to sync out of the local network either?

    IMO, your case would almost fall under a URI. I'm not 100% sure of this, but it looks like URI attachment currently only supports HTTP(S) protocol. Working off of that, you could run a local web server (which is rather simple to set up), which would serve your PDFs and you could attach URIs to the PDFs.

    Furthermore, group sync including file attachments (rather than links) does not work with WebDAV servers other than Zotero's server, so running a local WebDAV server would not work either. As adamsmith points out, using groups, the only other solution would be to run a local Zotero sync server.
    Working on the same database seems not possible. We tried it and Zotero does not open as soon as somebody else has his Firefox with the common Zotero storage path open.
    Based on this, it seems that you are open to using a single account among all the users on your local network. If that is the case, then you can either use (A) a local WebDAV server or (B) attach links to local files, which will sync. The relative links would work, assuming that the network location of your PDFs is consistently mapped across all computers.
  • Group sync does not allow attaching links to files
    This will likely change in the next major version, though.

    http://forums.zotero.org/discussion/24949/
  • @aurimas:
    Yes, I forgot about using a single Zotero account for all colleagues. It is like working from different PCs. The links are copied. This is good enough at the moment. Local syncing would be a nice feature, though.
    Thanks a lot.
  • Stefan - I'm still confused what the problem is - syncing the files or syncing the data?

    Local data syncing almost certainly won't happen, simply because it would always require a local server.
  • I am thinking of a file somewhere on a network drive and the individual Zotero users synchronize with this file.
    It would not require knowledge about server installation and it is rather save, as the network drive is backed up frequently.

    If this is not going to work, please forget about my comments.
  • edited November 22, 2012
    No, that's not possible. Data syncing requires extremely complex logic.

    (Technical side note: There's an effort to add synchronization support to WebDAV, which could in theory be something we could support in the future if any WebDAV servers actually implemented it. There's no guarantee any will, though, and I haven't reviewed that spec to see whether it would be suitable for our purposes. At the very least it would be a lot more work to support that than to use a server protocol we design ourselves.)
Sign In or Register to comment.