This is an old revision of the document!


Zotero ライブラリのデータ

Zoteroライブラリの構成要素 - データとファイル

It is important to fully understand how Zotero stores its data, so you can correctly back up your Zotero library and, when disaster strikes, recover it. By default, your entire Zotero library is stored in the 'zotero' directory of your Firefox profile. The most important file in this directory is the zotero.sqlite file, which contains the majority of your data: item metadata, notes, tags, etc. The directory also contains a 'storage' subdirectory, containing all of your file attachments, such as PDFs, web snapshots, audio files, or any other files you have imported (note that files that are linked are not copied into this subdirectory).

Your 'zotero' directory will likely contain several other files. These can include zotero.sqlite.bak (an automatic backup of zotero.sqlite, which is updated when you quit Firefox and the existing zotero.sqlite.bak file hasn't been updated in the last 12 hours) and zotero.sqlite.[number].bak files (automatic backups of zotero.sqlite that are created during certain updates to the Zotero extension).

Warning: Before you copy, delete or move any of these files, be sure that Firefox is closed. Failure to close Firefox before moving these files can damage your data.

あなたの Zotero ライブラリの保存場所

推奨法

Zoteroライブラリの保存フォルダを見つけるための最も手軽で信頼できる方法は、Zotero設定ウインドウ詳細タブで“Show Data Directory” ボタンを使うものです。

既定の保存場所

初期設定ではZoteroのデータは、OS によって異なりますが、以下の場所に保存されます。これらの場所はOSによっては隠されているかもしれません。

Zoteroの設定ウインドウで、任意の保存場所を指定した場合は、データは別の場所に保存されることになります。“Show Data Directory” ボタンは常に現在使用中のデータの保存場所を示します。Zotero設定ウインドウを開くことができないときは、'zotero.sqlite'を検索するとZoteroデータ・フォルダの場所を突き止めることに役立つでしょう。

Firefox用Zotero

Zotero for Firefox stores data within the Firefox profile directory by default.

Mac OS X:

/Users/<username>/Library/Application Support/Firefox/Profiles/<randomstring>/zotero

Windows Vista および Windows 7:

C:\Users\<User Name>\AppData\Roaming\Mozilla\Firefox\Profiles\<randomstring>\zotero

Windows 2000 および Windows XP:

C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<randomstring>\zotero

多くの Linuxディストリビューション:

~/.mozilla/firefox/Profiles/<randomstring>/zotero

Zotero スタンドアローン

Mac OS X:

/Users/<username>/Library/Application Support/Zotero/Profiles/<randomstring>/zotero

Windows Vista および Windows 7:

C:\Users\<User Name>\AppData\Roaming\Zotero\Profiles\<randomstring>\zotero

Windows 2000 および Windows XP:

C:\Documents and Settings\<username>\Application Data\Zotero\Profiles\<randomstring>\zotero

多くの Linuxディストリビューション:

~/.zotero/Profiles/<randomstring>/zotero

あなたの Zotero ライブラリのバックアップ

To back up your Zotero library, locate your Zotero library, close Firefox, and copy your 'zotero' data directory to a backup location, preferably on another storage device. As with all important data, it is a good idea to back up your Zotero data frequently.

Warning — Syncing: Syncing is not a substitute for backing up. For example, if you accidentally delete items in your library and sync your Zotero library, you won't be able to recover these items from the Zotero server.

Warning — Import/Export: Zotero allows you to export your Zotero library as a Zotero RDF file. However, exporting and importing your library via RDF won't result in an exact copy of your library, and it isn't recommended as a backup strategy.

For step-by-step, illustrated backup instructions, see this guide provided by the Northwestern University library.

バックアップからZoteroライブラリを復元する

When you lose your original Zotero library (e.g. when the hard drive fails or your computer is stolen), you can restore your library by replacing the contents of your active 'zotero' data directory with that of your backed-up 'zotero' data directory.

First, reinstall Zotero from zotero.org if necessary. After restarting Firefox, open the Advanced pane of the Zotero preferences and click “Show Data Directory”. This should reveal a directory containing zotero.sqlite and possibly a 'storage' subdirectory. Close Firefox and move zotero.sqlite and 'storage' from this folder into a temporary folder on your desktop. Next, copy zotero.sqlite and 'storage' from your backup into the active data directory. When you now reopen Firefox, your Zotero library should be restored.

Once you've successfully restored your data, you can delete the temporary folder.

最新の自動バックアップからの復元

If you make a critical mistake while using Zotero—for example, if you accidentally delete a large set of items—you may be able to revert to the last automatic backup.

  1. First, make sure to keep Firefox running, as the automatic backup might be overwritten when you quit Firefox. Then, locate your Zotero library and make a copy of the zotero.sqlite.bak file and name it zotero.sqlite.new.
  2. Optionally, in Zotero, select any items you have added since you last started Firefox (a saved search may be helpful), right-click the selection, choose “Export Selected Items…”, and export to Zotero RDF.
  3. Close Firefox. In your data directory, rename zotero.sqlite to zotero.sqlite.old, rename zotero.sqlite.new to zotero.sqlite, and restart Firefox. You should now see the backed-up version of your library.
  4. If you exported any items, import the RDF file you created to restore the data added during your last Firefox session.

If you're happy with the results, you can delete zotero.sqlite.old.

最新のアップグレードバックアップからの復元

Zotero prompts you to upgrade your database when you install certain (usually major) new versions. If you would like to revert to a previous version at a later point, you will have to manually replace your database with the automatic backup Zotero made during the upgrade. In most cases this will be the highest-numbered “zotero.sqlite.[num].bak” file in your Zotero data directory.

It's a good idea to make a backup of your entire Zotero data directory before making any changes.

If you have synced your data with the Zotero server, reverting to a previous version is as simple as reinstalling the previous version, closing Firefox, replacing “zotero.sqlite” in your Zotero data directory with “zotero.sqlite.[highest-number].bak”, and restarting Firefox. (Note that if you try to open an upgraded database in an earlier version, Zotero will display an error. Just close Firefox and replace the SQLite file.) Zotero will then sync from the Zotero server any changes made since you last used the older database.

If you were not using syncing, you may wish to export to Zotero RDF any items added since the database upgrade and then reimport those into the earlier version. Sorting your library by Date Added may help you find such items.

Bear in mind that word processor documents used with later Zotero versions often cannot be used again with earlier versions.

Zoteroデータに関する問題解決

私のアイテムはどこへ行ったのでしょう?

Occasionally after upgrades or system restores, users open Zotero to find their libraries almost completely blank. While you may find this a bit disconcerting if it happens to you, do not panic. In almost every case Zotero is looking in the wrong location for your data. You need to make sure that Zotero is looking in the right location for your Zotero files and that the right files are in that spot. (A library can also appear empty due to an extension conflict, so be sure to check known incompatible extensions and disable your other Firefox extensions if you're sure that Zotero is looking in the right place.)

1. Make sure you are in the correct Firefox Profile.

Occasionally when upgrading, Firefox creates a new profile. (If you notice that your bookmarks and browser history have changed or disappeared, it's likely that this has occurred.) You can use the Firefox Profile manager to make sure that you are in fact in the correct profile.

2. Make sure your data files are in the directory where Zotero is looking.

Use the “Show Data Directory” button in the Advanced pane of your Zotero preferences to reveal the current data directory. If this isn't the directory you were expecting, you can either specify a different data directory in the Advanced pane of the Zotero prefs or, with Firefox closed, move any existing Zotero files (zotero.sqlite and 'storage') out of the way and copy your desired Zotero files into the displayed directory. If you're not sure where your data is located, it's a good idea to look for larger versions of zotero.sqlite or zotero.sqlite.bak stored elsewhere on your hard drive and to look in the 'storage' directory for recently saved PDFs and other files.

Unless you have a good reason to use a custom data directory location, we recommend using the default location within your Firefox profile.

When specifying a custom data directory location, keep in mind that Zotero doesn't move or copy any data. You still need to copy your data into the specified location. Also, when pointing the data directory location to an existing directory, be sure to specify the parent directory containing zotero.sqlite and 'storage', not the 'storage' directory itself.

Finally, remember to close Firefox before making any changes to Zotero files.