syncing db?
So to sync a data between machines, where I can connect them via ssh, what do I need to sync? The entire profile, or just the sqlite file?
This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Syncing the rest of your profile directory isn't necessary for Zotero, though you'll want to make sure that any Zotero preferences you care about are the same on both systems.
Obviously this approach won't help if you change data on both machines (and the current approach to itemIDs isn't particulary helpful there either), but we'll be dealing with that in time.
http://forums.zotero.org/comments.php?DiscussionID=36&page=1#Item_4
So is there any workaround to this?
Thanks!
My question is: I was planning to set up automatic syncing using the rsync daemon mode. Is there any problem doing this so long as I'm not modifying data on the two machines simultaneously (which would be impossible!)?
E.g. does it matter if Firefox is open on one or both of the machines when the syncing occurs?
http://www.rsnapshot.org/
I've experienced no problems whatsoever with backing up in this way. Scheduled backups have occurred at the same time that I was using Zotero on the machine being backed-up with no ill effect. I've been able to restore the backed-up Zotero data when needed.
So that's some anecdotal evidence for you. Incidentally, rsnapshot can be set up to use ssh, so it might be worth taking a look at depending on the kind of system you'd like to set up.
I first looked into using Carbon Copy Cloner (which is a really nice GUI that uses rsync underneath), but ultimately thought using rsync directly per this tutorial was a little more transparent.
I may look into rsnapshot later, as time allows.
Oh, and I just am syncing the backup directory for Zotero; not the entire profile. Hope that's OK.
If needed, there is a howto for rsnapshot here:
http://www.rsnapshot.org/howto/
And here's a blog post about using rsnapshot on OS X:
http://www.nearinfinity.com/blogs/page/jharwig?entry=checkpointed_backups_in_os_x
As for the source computer, officially I'd have to recommend that Firefox be closed on that as well before doing the backup, since theoretically rsync could copy the file while it's in an inconsistent state. But realistically, you're unlikely to run into any trouble doing this, as the times when the database is actually being updated are intermittent and brief. (For example, Time Machine backups with Firefox open seem to work fine, though as far as I know they're theoretically vulnerable to the same problem.)
However, to be safe, you might want to rig up something to automatically run an rsync once Firefox is closed. You could probably do this with an AppleScript wrapper, though there might be better ways. That's fine, though you might want to keep your prefs.js file in sync too.