This is an old revision of the document!


백업과 복구(Backing up and Restoring your Zotero Library)

내 라이브러리는 반드시 정기적으로 백업하여야 한다. 동기화는 Zotero 서버에 '내 라이브러리'의 가장 최신 버전만 저장하여 백업에 대한 완벽한 대체수단이 되지는 못한다.

내 라이브러리 경로(Locating your Zotero Library)

기본적으로 내 라이브러리는 Firefox의 경우 Firefox profile에 Standalone 버전의 경우 Zotero 자체의 프로필의 'zotero' 디렉토리에 저장된다. Firefox 버전의 Zotero가 설치된 상태에서 Standalone 버전을 설치할 경우 설치 과정 중에 Firefox와 동일한 라이브러리를 사용할 것인지 묻는다. 반대의 경우(Standalone 버전이 설치된 상태에서 Firefox 버전을 설치하는 경우)도 마찬가지다.

내 Zotero 데이터 디렉토리를 찾는 가장 쉽고 안전한 방법은 “환경설정> 고급> 저장 위치”에서 “자료 디렉토리 표시(Show Data Directory)” 버튼을 클릭하는 것이다.

기본 경로(Default Locations)

Zotero 환경설정의 고급(Advanced 항목에서 원하는대로 경로를 지정하지 않았다면, 기본적으로 사용하는 OS에 따라 아래와 같은 경로에 데이터가 저장된다.

환경설정의 “자료 디렉토리 표시(Show Data Directory)” 버튼은 현재 사용 중인 데이터 경로를 표시해준다. 만약 Zotero 환경설정에 접속하지 못할 경우, 파일명 'zotero.sqlite'로 검색하면 데이터 디렉토리 위치를 찾을 수 있다.

Firefox 버전(Zotero for Firefox)

OS X
/Users/<username>/Library/Application Support/Firefox/Profiles/<randomstring>/zotero
Windows 7/Vista
C:\Users\<User Name>\AppData\Roaming\Mozilla\Firefox\Profiles\<randomstring>\zotero
Windows XP/2000
C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<randomstring>\zotero
Linux (most distributions)
~/.mozilla/firefox/Profiles/<randomstring>/zotero

Standalone 버전(Zotero Standalone)

OS X
/Users/<username>/Library/Application Support/Zotero/Profiles/<randomstring>/zotero
Windows 7/Vista
C:\Users\<User Name>\AppData\Roaming\Zotero\Profiles\<randomstring>\zotero
Windows XP/2000
C:\Documents and Settings\<username>\Application Data\Zotero\Profiles\<randomstring>\zotero
Linux (most distributions)
~/.zotero/Profiles/<randomstring>/zotero

라이브러리 컨텐츠(Library Contents)

Zotero 디렉토리에서 가장 중요한 파일은 'zotero.sqlite' 파일이다. The most important file in the 'zotero' 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 or Zotero Standalone 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 Zotero updates).

Warning: Before you copy, delete or move any of these files, be sure that Firefox and/or Zotero Standalone are closed. Failure to do so before moving these files can damage your data.

Backing Up Your Zotero Library

Rather than backing up just your Zotero library, we recommend using a backup utility that automatically backs up your entire hard drive to an external device on a regular basis. Most modern operating systems offer such functionality (e.g., Time Machine on Macs).

If you want to back up your Zotero library specifically, locate your Zotero library, close Firefox and/or Zotero Standalone, and copy your 'zotero' data directory to a backup location (copy the entire directory, including 'storage' and the other subdirectories), 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.

Restoring Your Zotero Library from a Backup

Between manual backups, automatic backups, and synced data, it's often possible to restore a lost Zotero library or restore data that was accidentally deleted.

Before following these steps, be sure that Zotero is looking in the right place for your data.

Restoring your Zotero library using Zotero syncing

If you were using Zotero syncing and have an empty local library, you can likely restore your library simply by syncing with the Zotero server. After verifying that your library exists on zotero.org, simply reenter your username and password into the Sync pane of the Zotero for Firefox or Zotero Standalone preferences and click the Sync button in the toolbar. (Zotero only syncs explicit deletions, so just syncing an empty library won't overwrite the server data unless you deleted items manually.)

If you have a local Zotero library that you want to overwrite, close Zotero and delete the old Zotero data directory before syncing.

Restoring your Zotero library from a backup

If you were not using Zotero syncing (or were but don't want to perform a full sync) and have a backup of your Zotero data directory, you can restore your library by replacing the contents of your active 'zotero' directory with that of your backed-up 'zotero' directory.

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 or Zotero Standalone and move zotero.sqlite and 'storage' from this folder into a temporary folder on your desktop. Next, copy—don't move—zotero.sqlite and 'storage' from your backup into the active data directory. When you now reopen Firefox or Zotero Standalone, your Zotero library should be restored.

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

Note that, if you were using Zotero syncing, any changes you made to your library since the backup and subsequently synced to the Zotero server will be applied to your restored database as soon as you sync.

Restoring your Zotero library from a backup and overwriting synced changes

If you or someone else made unwanted changes to your Zotero library and synced those changes to the server, you may be able to restore data by using a local backup of your Zotero data directory.

First, disable auto-sync in the Sync pane of the Zotero for Firefox or Zotero Standalone preferences. Open the Advanced pane of the preferences and click “Show Data Directory”. This should reveal a directory containing zotero.sqlite and possibly a 'storage' subdirectory. Close Firefox or Zotero Standalone and move zotero.sqlite and 'storage' from this folder into a temporary folder on your desktop. Next, copy—don't move—zotero.sqlite and 'storage' from your backup into the active data directory. When you now reopen Firefox or Zotero Standalone, your Zotero library should be restored.

Were you to sync again now, the more recent server data would replace the data you just restored. Instead, if this is a personal library, you can use the Restore to Zotero Server sync reset option to replace your server library with your local one. If this is a group library, Restore to Zotero Server will have no effect, and you will need to duplicate the items, which you can do by exporting them to RDF, importing them into your personal library, and then dragging them back to the group. When you then sync, the more recent changes from the server will still be applied to your local database, but the newly imported data will not be affected and will sync up to the server.

Once you've successfully restore your data, you can reenable auto-sync and delete the temporary folder on your desktop.

Restoring from the last automatic backup

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.

If you're using syncing but don't have auto-sync enabled, first check your online library on zotero.org to see if the data is correct there. If so, you can use the Restore from Zotero Server sync reset option to replace your local library with the server library.

If you were not using syncing or the new data has already synced to the server, follow these steps:

  1. First, make sure to keep Firefox or Zotero Standalone running, as the automatic backup might be overwritten when you quit the application.
  2. If you're using syncing, temporarily disable auto-sync in the Sync pane of the Zotero preferences.
  3. Locate your Zotero library and make a copy of the zotero.sqlite.bak file and name it zotero.sqlite.new.
  4. Optionally, in Zotero, select any items you have added since you last started Firefox/Standalone (a saved search may be helpful), right-click the selection, choose “Export Selected Items…”, and export to Zotero RDF.
  5. Close Firefox/Standalone. In your data directory, rename zotero.sqlite to zotero.sqlite.old, rename zotero.sqlite.new to zotero.sqlite, and restart Firefox/Standalone. You should now see the backed-up version of your library.
  6. If you were using syncing, were you to sync again now, the more recent server data would replace the data you just restored. Instead, if this is a personal library, you can use the Restore to Zotero Server sync reset options to replace your server library with your local one. If this is a group library, Restore to Zotero Server will have no effect, and you will need to duplicate the items, which you can do by exporting them to RDF, importing them into your personal library, and then dragging them back to the group.
  7. Finally, if you exported any items before the restore, import the RDF file you created to restore the data added during your last Firefox/Standalone session.

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

Restoring from the last upgrade backup

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 or Zotero Standalone, replacing “zotero.sqlite” in your Zotero data directory with “zotero.sqlite.[highest-number].bak”, and restarting Firefox or Zotero Standalone. (Note that if you try to open an upgraded database in an earlier version, Zotero will display an error. Just close Firefox or Zotero Standalone 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.

Troubleshooting Zotero Data issues

Where did my items go?

In rare cases 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.

If you're using Zotero for Firefox, note that a library can also appear empty due to an extension conflict, so be sure to check known incompatible extensions and disable all your other Firefox extensions if you're sure that Zotero is looking in the right place.

1. (Zotero for Firefox) 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 or Zotero Standalone 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 or Zotero Standalone 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 or Zotero Standalone before making any changes to Zotero files.