How to copy over cracked content

Translations of this page:

We're in the process of updating the documentation for Zotero 5.0. Some documentation may be outdated in the meantime. Thanks for your understanding.

This document will help answer the following questions:

  • How does Zotero save my data?
  • Where did my entries go?
  • Where is my Zotero data?
  • How do I create a backup of my Zotero library?

Before we can answer these specific questions, however, it is important to understand some of the basic principles of data storage in Zotero.

What is a Zotero library made of?

Before we get into the details of how to find your data or restore your library, it is extremely important to understand what your library is made of. By default, your entire Zotero library is saved in the “zotero” folder of your Firefox profile. Within this directory there are two crucial parts: the zotero.sqlite file and the “storage” folder. The zotero.sqlite file contains the majority of your data: entry information, notes, tags, etc. The “storage” folder contains all of your attachments: PDFs, web snapshots, audio files, and any other files you have imported.

Note that these files are different from Zotero RDF files (e.g. “Exported Items.rdf”) created by Zotero's export function. It is possible to import your data from an RDF file; however, the direct restoration of the data is at the moment the much more precise and reliable method.

Danger: Before copying, moving or deleting files, always make sure that Firefox has been closed. Moving files while Firefox is still running can damage or lose your data.

Find your Zotero library

The fastest and most reliable way to find your Zotero data directory is via the “Show data directory” button in the Advanced tab of the Zotero settings. If you cannot open the Zotero window via the Zotero button, you can also open the settings via Firefox> Extras> Add-ons> Extensions> Zotero> Settings / Options if Zotero is installed.

By default, Zotero data is saved in your Firefox profile in these different directories, depending on the operating system. In most cases you have to activate the display of hidden folders and files in your file manager before it shows the Zotero folders.

On a Mac:

/ Users / / Library / Application Support / Firefox / Profiles / / zotero

In Windows 2000 / XP:

C: \ Documents and Settings \ \ Application Data \ Mozilla \ Firefox \ Profiles \ \ zotero

In Windows Vista and Windows 7:

C: \ Users \ \ AppData \ Roaming \ Mozilla \ Firefox \ Profiles \ \ zotero

Under most Linux distributions:

~ / .mozilla / firefox / / zotero

Browsing your hard drive for zotero.sqlite is another way to find the Zotero data directory.

If you have selected a user-defined data directory in the advanced settings, your data will be saved there. The “Show data directory” button always shows the data directory currently in use.

Where did my entries go?

In rare cases, after upgrades or system restores, users open Zotero and are confronted with an almost completely empty library. Understandably, this is very worrying, but don't panic. In almost all of these cases, the underlying problem is that Zotero is looking for your data in the wrong place. You need to make sure that Zotero is looking for the Zotero files in the right location and that the correct files are in that location. (An empty library can also be the result of a conflict between Firefox extensions. Therefore, check the list of incompatible extensions and disable other Firefox extensions if you are sure that Zotero is looking for the data in the correct directory.)

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

Occasionally Firefox will create a new profile during an upgrade process. (If your bookmarks and history have changed or disappeared, that is an indicator that they have happened.) Use Firefox Profile Manager to verify that you are on the correct profile.

2. Make sure your data is in the directory where Zotero is looking for it.

Use the “Show data directory” button in the advanced settings to display the current data directory. If this is not the right one, you can either enter a specific directory or, after exiting Firefox, copy all existing but in the wrong place Zotero data (zotero.sqlite and “storage”) into the directory shown. If you are not sure where the data is located, you should look for larger versions of zotero.sqlite or zotero.sqlite.bak on your hard drive and check the “storage” directory for recently changed PDFs and other files.

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

Note that if you specify a custom data directory, Zotero will not move or copy any data. You yourself have to copy the data to the specified location. Also, please make sure that when you set the storage location to an existing directory, you select the root directory with zotero.sqlite and 'storage' and not the 'storage' folder itself.

Finally, don't forget to quit Firefox before making any changes to Zotero files.

How do I create a backup of my Zotero library?

To back up your library, quit Firefox. Then copy your Zotero data directory to the location where you want to create the backup - ideally on another data carrier. You can find your data directory by going to the Actions menu (cogwheel) and selecting “Show data directory” under Settings> Advanced. If you cannot open the Zotero window via the Zotero button, you can also open the settings via Firefox> Extras> Add-ons> Extensions> Zotero> Settings / Options. The Zotero data directory contains your database as well as all associated files and attachments (pdfs, images, websites, etc.).

As with all important data, back up your data frequently and regularly.

How do I restore my Zotero library from a backup?

In the worst-case scenario (defective hard drive, stolen computer, etc.), you can simply copy the content of your saved data directory into the current Zotero data directory.

If necessary, reinstall Zotero from zotero.org first. After restarting Firefox, open the “Advanced” tab in Settings and click “Show Data Directory”. This will open a folder containing zotero.sqlite and possibly a “storage” folder. Quit Firefox and move zotero.sqlite and “storage” to a temporary folder on your computer. Next, copy zotero.sqlite and “storage” from your backup into the active data directory. Now when you restart Firefox, your Zotero library should be there for you again.

After you have successfully restored your data, you can delete the temporary folder on your workstation again.

Restore the library from the last automatic backup

Every time you quit Firefox and the computer is idle, Zotero creates a backup copy within your data directory if the last backup was more than 12 hours ago. If you should make a fatal mistake while using Zotero - for example if you accidentally delete a large number of entries (and they are no longer in the trash) - you can reset your library to the state of the last backup.

First use without quitting Firefox, the “Show data directory” function in the “Advanced” tab of the Zotero settings to get to your active data directory. Make a copy of the zotero.sqlite.bak file and rename it to zotero.sqlite.new. Then in Zotero select all the entries you have created since the last time you started Firefox (a saved search can help you with this), right click on those entries, select “Export Selected Entries” and export them as Zotero RDF . Now quit Firefox. In your active data directory, rename zotero.sqlite to zotero.sqlite.old and zotero.sqlite.new to zotero.sqlite and restart Firefox. You should now see the previous version of your library. The last step is to import the RDF file you created earlier to restore the data you added since the last start.