Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
zotero_data [2018/07/16 20:12] dstillmanzotero_data [2019/12/16 21:17] – [Backing Up Your Zotero Data] Remove outdated instructions from Northwestern dstillman
Line 3: Line 3:
 ===== Locating Your Zotero Data ===== ===== Locating Your Zotero Data =====
  
-The easiest and most reliable way to find your Zotero data is by clicking the "Show Data Directory" button in the [[preferences/advanced|Advanced]] tab of your Zotero [[preferences|Preferences]] window. This will reveal the folder on your computer that contains your Zotero database, attached files, and other auxiliary files.+The easiest and most reliable way to find your Zotero data is by clicking the "Show Data Directory" button in the [[preferences/advanced|Advanced]] tab of your Zotero [[preferences|Preferences]] window. This will reveal the folder on your computer that contains your Zotero database and attachment files.
  
 ==== Default Locations ==== ==== Default Locations ====
Line 31: Line 31:
  
 The "Show Data Directory" button will always reveal the data directory currently in use and is the recommended method for finding your data directory. If you're unable to access the Zotero preferences, a search for the file name 'zotero.sqlite' can also help you locate the Zotero data directory. The "Show Data Directory" button will always reveal the data directory currently in use and is the recommended method for finding your data directory. If you're unable to access the Zotero preferences, a search for the file name 'zotero.sqlite' can also help you locate the Zotero data directory.
-===== Library Contents =====+===== Data Directory Contents =====
  
 The most important file in the data 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 [[attaching_files|linked]] are not copied into this subdirectory). The most important file in the data 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 [[attaching_files|linked]] are not copied into this subdirectory).
Line 40: Line 40:
  
  
-===== Backing Up Your Zotero Library =====+===== Backing Up Your Zotero Data =====
  
-We strongly recommend that you regularly back up your Zotero library. Syncing is not a good substitute for backing up: the Zotero servers only store the most recent version of your library, and it takes just a single (possibly automatic) sync to change the server copy.+We strongly recommend that you regularly back up your Zotero database. Syncing is not a good substitute for backing up: the Zotero servers only store the most recent version of your libraries, and it takes just a single (possibly automatic) sync to change the server copy.
  
-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).+Rather than backing up just your Zotero database, 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 data specifically, [[zotero_data#locating_your_zotero_data|locate your Zotero data]], close Zotero, and copy your data directory (the //entire directory//, including ''storage'' and the other subdirectories) 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.+If you want to back up your Zotero data specifically, [[zotero_data#locating_your_zotero_data|locate your Zotero data]], close Zotero, and copy your data directory (the //entire directory//, including ''zotero.sqlite'' and ''storage'' and the other subdirectories) 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**: Zotero lets you 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. +**Warning**: Zotero lets you export 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. 
- +===== Restoring Your Zotero Data From a Backup =====
-For step-by-step, illustrated backup instructions, see [[http://libguides.northwestern.edu/content.php?pid=68444&sid=676064|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. 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.
Line 59: Line 56:
  
  
-==== Restoring your Zotero library using Zotero syncing====+==== Restoring Your Zotero Data Using Zotero Syncing====
  
 If you were using Zotero syncing and have an empty local library, you can likely restore your data simply by syncing with your online library. After verifying that your library is correct on zotero.org, simply reenter your username and password in the Sync pane of the Zotero 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 were using Zotero syncing and have an empty local library, you can likely restore your data simply by syncing with your online library. After verifying that your library is correct on zotero.org, simply reenter your username and password in the Sync pane of the Zotero 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**.)
Line 65: Line 62:
 If you have a local Zotero library that you want to overwrite, close Zotero and delete the old [[#locating_your_zotero_data|Zotero data directory]] before syncing. Syncing your database with a different Zotero account will also prompt you to remove the existing local database. If you have a local Zotero library that you want to overwrite, close Zotero and delete the old [[#locating_your_zotero_data|Zotero data directory]] before syncing. Syncing your database with a different Zotero account will also prompt you to remove the existing local database.
  
-==== Restoring your Zotero library from backup ====+==== Restoring Your Zotero Data From 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 your active data directory with your backed-up data directory. 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 your active data directory with your backed-up data directory.
Line 77: Line 74:
 Note that, if you were using Zotero syncing, any changes you made to your library since the backup and subsequently synced to your online library will be applied to your restored database as soon as you sync. If you don't want that to happen, see the following section. Note that, if you were using Zotero syncing, any changes you made to your library since the backup and subsequently synced to your online library will be applied to your restored database as soon as you sync. If you don't want that to happen, see the following section.
  
-==== Restoring your Zotero library from backup and overwriting synced changes ====+==== Restoring Your Zotero Data From Backup and Overwriting Synced Changes ====
  
 If you or someone else made unwanted changes to your Zotero library and synced those changes to your online library, you may be able to restore data by using a local backup of your Zotero data directory. If you or someone else made unwanted changes to your Zotero library and synced those changes to your online library, you may be able to restore data by using a local backup of your Zotero data directory.
Line 85: Line 82:
   - Once you see your restored data, were you to sync again, the more recent data in the online library would replace the data you just restored.   - Once you see your restored data, were you to sync again, the more recent data in the online library would replace the data you just restored.
     - If you're trying to restore a small number of deleted items or notes, you can simply duplicate the items — by right-clicking and choosing "Duplicate Item(s)" — so that the new copies remain even after syncing.     - If you're trying to restore a small number of deleted items or notes, you can simply duplicate the items — by right-clicking and choosing "Duplicate Item(s)" — so that the new copies remain even after syncing.
 +    - If you're trying to restore deleted collections, you can create duplicate collections and drag items from the old collections to the new ones. When you sync, the old collections will be deleted but the new ones will remain.
     - If many items were affected or collections were deleted, you can use [[kb:sync_reset_options#restore_to_online_library|Restore to Online Library]] to force Zotero to upload the local version of the library, overwriting previously synced changes.     - If many items were affected or collections were deleted, you can use [[kb:sync_reset_options#restore_to_online_library|Restore to Online Library]] to force Zotero to upload the local version of the library, overwriting previously synced changes.
  
 If you're happy with the results, you can re-enable auto-sync and continue working. If you're happy with the results, you can re-enable auto-sync and continue working.
  
-==== Restoring from the last automatic backup ====+==== 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 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. Note that automatic backups contain only data, not files.
- +
-If you're using [[sync|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, close Zotero, go to your Zotero data directory, and rename it (e.g., to "Zotero-old"). Then, re-open Zotero and sync from the Zotero servers to the new empty local library. +
- +
-If you don't want to do a full sync or if the changes have already synced to the online library, follow these steps to restore from an automatic backup. Note that automatic backups contain only data, not files.+
  
   - First, make sure to keep Zotero running, as the automatic backup might be overwritten when you quit the application.   - First, make sure to keep Zotero running, as the automatic backup might be overwritten when you quit the application.
Line 101: Line 95:
   - [[zotero_data#locating_your_zotero_data|Locate your Zotero data]] and make a copy of any zotero.sqlite.bak files. The timestamps of the files may help you determine which file would contain the data you're trying to restore.   - [[zotero_data#locating_your_zotero_data|Locate your Zotero data]] and make a copy of any zotero.sqlite.bak files. The timestamps of the files may help you determine which file would contain the data you're trying to restore.
   - Close Zotero. In your data directory, rename zotero.sqlite to zotero.sqlite.old, rename one of the .bak copies you made to zotero.sqlite, and restart Zotero. You should now see the backed-up version of your library.   - Close Zotero. In your data directory, rename zotero.sqlite to zotero.sqlite.old, rename one of the .bak copies you made to zotero.sqlite, and restart Zotero. You should now see the backed-up version of your library.
-  - Were you to sync again now, the more recent data in the online library would replace the data you just restored.+  - If you were using syncing and the undesired changes were already syncedsyncing now would cause the more recent data in the online library to replace the data you just restored.
     - If you're trying to restore a small number of deleted items or notes, you can simply duplicate the items — by right-clicking and choosing "Duplicate Item(s)" — so that the new copies remain even after syncing.     - If you're trying to restore a small number of deleted items or notes, you can simply duplicate the items — by right-clicking and choosing "Duplicate Item(s)" — so that the new copies remain even after syncing.
 +    - If you're trying to restore deleted collections, you can create duplicate collections and drag items from the old collections to the new ones. When you sync, the old collections will be deleted but the new ones will remain.
     - If many items were affected or collections were deleted, you can use [[kb:sync_reset_options#restore_to_online_library|Restore to Online Library]] to force Zotero to upload the local version of the library, overwriting previously synced changes.     - If many items were affected or collections were deleted, you can use [[kb:sync_reset_options#restore_to_online_library|Restore to Online Library]] to force Zotero to upload the local version of the library, overwriting previously synced changes.
  
 If you're happy with the results, you can re-enable auto-sync and continue working. Keep zotero.sqlite.old until you're sure all your data is intact and in sync across all your computers. If you're happy with the results, you can re-enable auto-sync and continue working. Keep zotero.sqlite.old until you're sure all your data is intact and in sync across all your computers.
  
-==== Restoring from the last upgrade backup ====+==== Restoring From the Last Upgrade Backup ====
  
 When you upgrade to a major new version of Zotero, Zotero will automatically update your database to work with the new version. If you would like to revert to a previous version of Zotero 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. When you upgrade to a major new version of Zotero, Zotero will automatically update your database to work with the new version. If you would like to revert to a previous version of Zotero 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.
Line 118: Line 113:
  
 Bear in mind that word processor documents used with later Zotero versions may not be usable with earlier versions, and Zotero developers and community members will provide only limited support for earlier versions (mostly to recommend upgrading to the current version). Bear in mind that word processor documents used with later Zotero versions may not be usable with earlier versions, and Zotero developers and community members will provide only limited support for earlier versions (mostly to recommend upgrading to the current version).
-===== Troubleshooting Zotero Data issues ===== 
  
-==== Where did my items go? ====+===== Locating Missing Zotero Data ===== 
 + 
 +If you open Zotero to find your library blank or missing lots of data, don't panic. Data is never removed unless you delete it, so Zotero is most likely looking at a different database from the one you were using previously. 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 have recently updated to Zotero 5 and are missing data, see [[kb/data_missing_after_zotero_5_upgrade|Missing Data After Zotero 5 Upgrade]]. Zotero 5 was released in 2017, so this no longer applies to most people. 
 + 
 +If you're using a different computer from the one where you created the missing data, and your data is also missing in your online library, your data simply hasn't synced from the computer where you created it. See [[kb:Changes Not Syncing]].
  
-If you open Zotero to find your library blank or missing lots of data, don't panic. Zotero is mostly likely simply looking in the wrong location for the 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 the same computer where you originally created the missing data, you'll need to locate your Zotero data on this computer. Use the "Show Data Directory" button in the [[preferences/advanced|Advanced]] pane of the Zotero preferences to reveal the current data directoryTake note of the names, sizes, and dates of the zotero.sqlite* files in this folder. An empty Zotero database will be either approximately 1 MB (~1,000 KB) or 5 MB.
  
-Use the "Show Data Directory" button in the [[preferences/advanced|Advanced]] pane of the Zotero preferences to reveal the current data directory. If this isn'the directory you were expectingyou can either specify a different data directory from the preferences or, with Zotero closed, rename that directory (e.g., to "Zotero-Old") and move your desired Zotero directory to the specified location. If you're not sure where your most recent Zotero data is located, it'good idea to look for larger versions of zotero.sqlite or zotero.sqlite.bak stored elsewhere on your hard drive and to look at the dates of folders within the 'storage' directory.+If you see only 1 MB or 5 MB zotero.sqlite files, look in the 'storage' folder (if one exists) for folders with timestamps corresponding with your previous usage of Zotero. If you see them, this is likely the Zotero data directory you were using previouslybut something happened to the Zotero databaseso you may need to [[#restoring_your_zotero_library_from_a_backup1|restore a zotero.sqlite file from a backup]].
  
-If you have recently updated to Zotero 5 and are missing data, see [[kb/data_missing_after_zotero_5_upgrade|Missing Data After Zotero 5 Upgrade]].+If this isn't the directory you were expecting, or if you don't see a 'storage' directory, you'll need to locate your previous data directory and either specify a different data directory from the preferences orwith Zotero closed, rename the current directory (e.g., to "Zotero-Old") and move your desired Zotero directory to the specified location. If you're not sure where your most recent Zotero data is located, look for larger versions of zotero.sqlite or zotero.sqlite.bak stored elsewhere on your hard drive and look at the dates of the folders within the 'storage' folder
  
-Unless you have a good reason to use a custom data directory location, we recommend using the default location in your home directory.+Unless you have a good reason to use a custom data directory location, we recommend using the [[#default_locations|default location]] in your home directory.
  
 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. 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 Zotero before making any changes to Zotero files. Finally, remember to close Zotero before making any changes to Zotero files.
zotero_data.txt · Last modified: 2023/07/13 17:52 by dstillman