Saturday, August 15, 2015

[solved] first run of zotero back-up

I had a chance to recently attempt my first Zotero back-up and resoration. I have the stand-alone version, which I then link to a few browsers with browser plug-ins (see bottom of page). In other words, Zotero installs as a regular application, available on or offline. Zotero browser-plugins (typically XPI) install into the desired browser independent of whether Zotero is installed on one's system at all.

other bibliography/citation-related notes

BibTex tutorial :: exporting cite keys from Zotero :: helping cite keys match database


Overview

From what I could tell from Zotero's instructions, all I would need to do is backup my entire Zotero directory, and then put it in the new drive. Helpful, but experience showed it could be broken down more explicitly:
  1. Back-up the Zotero database directory (usually a few hundred MB; mine fits on a CD).
  2. Install a blank version of Zotero, on the new drive. Be sure Zotero is stable (open and close it a couple times).
  3. Add a browser connector, if you want or need one (optional).
  4. Take the backed-up data directory and overwrite the fresh install's data directory.
  5. Open Zotero and all backed-up citations should be there.
  6. Associated back-up issue: suppose one has a folder with several Ebooks or PDF's on some subject. Zotero can apparently store local HDD links to these documents, as well as metadata about the them. These links will also be in the Zotero database, just like web links, and using links uses less space in the database than the full documents would use. However, after backing up Zotero on a new install, you'll also need to duplicate the directory structure where these documents are kept. In this way, Zotero's links will point to the documents.

Back-up

Initially, I made a mistake. I backed-up the Zotero directory, burning it onto a DVD with other data. This directory and all files within it were suspiciously only about 10MB. Eventually I determined I had only backed-up the application directory. The data directory is what should be backed-up. But the data directory is not in plain sight within the directory structure. To find the data directory, I searched for one of its files, zotero.sqlite:
$ find -name zotero.sqlite
./.zotero/zotero/af5baci7.default/zotero/zotero.sqlite
This is the correct Zotero directory to back-up, the data directory. That is, ~.zotero/zotero/[hashnumber].default/zotero/*. This directory was a few hundred MB. As for the application directory, why back it up at all? Download and install the latest version of Zotero instead.

Restoring

First, install the Zotero app, either the old one or the latest version. If it's a new install it will create a new folder in your home directory: ~.zotero/zotero/[newhashnumber].default/zotero/. Open and close Zotero a couple times to be sure the install is clean. Then just take the old data directory (you backed-it up above) and overwrite the new data directory. Your new structure will be something like ~.zotero/zotero/[newhashnumber].default/zotero/[old backed-up data]. The next time I opened Zotero, my backed-up citations were there.

Connect to browsers (optional)

You can manually enter Zotero entries. Browser plug-ins make it easier for some online sources. But after a back-up, the connector between stand-alone Zotero and its browser plug-ins, may or may not be broken. Once the standalone is working and up-to-date, start Zotero and then go to the links for the connector that matches the browser you like. Here's a couple of them.

Chromium
Chromium Zotero Connector

Opera
Opera Zotero Connector

No comments: