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 [2017/12/13 23:19] – [Restoring Your Zotero Library from a Backup] dstillmanzotero_data [2018/07/16 20:12] 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.+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.
  
 ==== Default Locations ==== ==== Default Locations ====
Line 18: Line 18:
 === Zotero 4.0 for Firefox === === Zotero 4.0 for Firefox ===
  
-|**macOS**|<code>/Users/<username>/Library/Application Support/Firefox/Profiles/<randomstring>/zotero</code>|+|**macOS**|<code>/Users/<username>/Library/Application Support/Firefox/Profiles/<randomstring>/zotero</code> <html><small>Note: The /Users/&lt;username&gt;/Library folder is hidden by default. To access it, click on your desktop, hold down the Option key, and click the Finder's Go menu, and then select Library from the menu.</small></html>|
 |**Windows 7 and higher**|<code>C:\Users\<User Name>\AppData\Roaming\Mozilla\Firefox\Profiles\<randomstring>\zotero</code>| |**Windows 7 and higher**|<code>C:\Users\<User Name>\AppData\Roaming\Mozilla\Firefox\Profiles\<randomstring>\zotero</code>|
 |**Windows XP/2000**|<code>C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<randomstring>\zotero</code>| |**Windows XP/2000**|<code>C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<randomstring>\zotero</code>|
Line 25: Line 25:
 === Zotero 4.0 Standalone === === Zotero 4.0 Standalone ===
  
-|**macOS**|<code>/Users/<username>/Library/Application Support/Zotero/Profiles/<randomstring>/zotero</code>|+|**macOS**|<code>/Users/<username>/Library/Application Support/Zotero/Profiles/<randomstring>/zotero</code> <html><small>Note: The /Users/&lt;username&gt;/Library folder is hidden by default. To access it, click on your desktop, hold down the Option key, and click the Finder's Go menu, and then select Library from the menu.</small></html>|
 |**Windows 7 and higher**|<code>C:\Users\<User Name>\AppData\Roaming\Zotero\Zotero\Profiles\<randomstring>\zotero</code>| |**Windows 7 and higher**|<code>C:\Users\<User Name>\AppData\Roaming\Zotero\Zotero\Profiles\<randomstring>\zotero</code>|
 |**Windows XP/2000**|<code>C:\Documents and Settings\<username>\Application Data\Zotero\Profiles\<randomstring>\zotero</code>| |**Windows XP/2000**|<code>C:\Documents and Settings\<username>\Application Data\Zotero\Profiles\<randomstring>\zotero</code>|
Line 33: Line 33:
 ===== Library Contents ===== ===== Library Contents =====
  
-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 [[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).
  
 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 Zotero 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). 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 Zotero 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).
Line 69: Line 69:
 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.
  
-Open the Advanced pane of the Zotero preferences and make a note of the specified path under Data Directory Location. (By default, this will be "Zotero" within your home directory.) Click "Show Data Directory", which should reveal your active data directory containing zotero.sqlite and possibly a 'storage' subdirectory. Close Zotero, move one level up in the filesystem (Cmd-up-arrow on macOS, Alt-up-arrow on Windows), and rename the directory to "Zotero-Old". Next, copy the data directory from your backup to the original location.+Open the Advanced pane of the Zotero preferences and make a note of the specified path under Data Directory Location. (By default, this will be "Zotero" within your home directory.) Click "Show Data Directory", which should reveal your active data directory containing zotero.sqlite and possibly a 'storage' subdirectory. Close Zotero, move one level up in the filesystem (Cmd-up-arrow on macOS, Alt-up-arrow on Windows), and rename the directory to "Zotero-Old". Next, copy the data directory from your backup to the original location (e.g., "Zotero").
  
 When you reopen Zotero, you should see your restored Zotero data. When you reopen Zotero, you should see your restored Zotero data.
Line 81: Line 81:
 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.
  
-See [[kb:sync_reset_options#restore_to_online_library|Restore to Online Library]] for further details.+  - Temporarily disable auto-sync in the Sync pane of the Zotero preferences. 
 +  - Follow the steps in the preceding section to restore from a backup of your Zotero data directory. 
 +  - 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 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.
  
 ==== Restoring from the last automatic backup ==== ==== Restoring from the last automatic backup ====
Line 95: Line 101:
   - [[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'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. +  - Were you to sync again now, the more recent data in the online library would replace the data you just restored. 
-  - 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 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 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.+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 ====
zotero_data.txt · Last modified: 2023/07/13 17:52 by dstillman