Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
zotero_data [2017/12/13 22:50] – [Backing Up Your Zotero Library] dstillmanzotero_data [2017/12/13 23:19] – [Restoring Your Zotero Library from a Backup] dstillman
Line 61: Line 61:
 ==== Restoring your Zotero library using Zotero syncing==== ==== 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 your online library. After verifying that your library exists on zotero.org, simply reenter your username and password into the Sync pane of 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**.)
  
 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.
Line 67: Line 67:
 ==== Restoring your Zotero library from a backup ==== ==== 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 data directory with that of 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 click "Show Data Directory". This should reveal your active data directory containing zotero.sqlite and possibly a 'storage' subdirectory. Close Zotero 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 Zotero, your Zotero library should be restored.+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 Zoteromove 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.
  
-Once you've successfully restored your data, you can delete the temporary folder on your desktop.+When you reopen Zotero, you should see your restored Zotero data.
  
-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.+Once you've successfully restored your data, you can delete the "Zotero-Old" folder, but it's a good idea to keep it for a while until you're sure your data is correct. 
 + 
 +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 a backup and overwriting synced changes ==== ==== Restoring your Zotero library from a backup and overwriting synced changes ====
Line 79: 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.
  
-First, temporarily disable auto-sync in the Sync pane of the Zotero preferences. Open the Advanced pane of the preferences and click "Show Data Directory". This should reveal your active data directory containing zotero.sqlite and possibly a 'storage' subdirectory. Close Zotero 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 Zotero, your Zotero library should be restored. +See [[kb:sync_reset_options#restore_to_online_library|Restore to Online Library]] for further details.
- +
-Were you to sync again now, the more recent server data would replace the data you just restored. +
- +
-If you're trying to restore a small number of deleted items or notes, you can duplicate the affected items by right-clicking on them and choosing "Duplicate Item(s)". When you then sync, the more recent changes from the online library will still be applied to your local database, but the duplicate items will not be affected and will sync up to the online library. +
- +
-Alternatively, if many items were affected or collections were deleted, you can use Restore to Online Library from the Sync -> Reset pane of the Zotero preferences to force Zotero to upload the local version of the library, overwriting previously synced changes. [Note: This functionality will be available in Zotero 5.0.31. Until then, install the [[/support/dev_builds|5.0 Beta]], perform the restore, and switch back to the main version.] +
- +
-If you're happy with the results, you can re-enable auto-sync and continue working. Keep the temporary folder on your desktop until you're sure all your data is intact. +
  
 ==== Restoring from the last automatic backup ==== ==== Restoring from the last automatic backup ====
Line 96: Line 89:
 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'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:+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.
   - If you're using syncing, temporarily disable auto-sync in the Sync pane of the Zotero preferences.   - If you're using syncing, temporarily disable auto-sync in the Sync pane of the Zotero preferences.
-  - [[zotero_data#locating_your_zotero_library|Locate your Zotero library]] 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 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 Restore to Online Library from the Sync -> Reset pane of the Zotero preferences to force Zotero to upload the local version of the library, overwriting previously synced changes. [Note: This functionality will be available in Zotero 5.0.31. Until then, install the [[/support/dev_builds|5.0 Beta]], perform the restore, and switch back to the main version.]+  - 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.
Line 108: Line 102:
 ==== Restoring from the last upgrade backup ==== ==== 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 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.
  
 It's a good idea to make a backup of your entire Zotero data directory before making any changes. 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 Zotero, replacing "zotero.sqlite" in your Zotero data directory with "zotero.sqlite.[highest-number].bak", and restarting Zotero. (Note that if you try to open an upgraded database in an earlier version, Zotero will display an error. Just close Zotero 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 have synced your data with the Zotero servers, reverting to a previous version is as simple as reinstalling the previous version, closing Zotero, replacing "zotero.sqlite" in your Zotero data directory with "zotero.sqlite.[highest-number].bak", and restarting Zotero. (Note that if you try to open an upgraded database in an earlier version, Zotero will display an error. Just close Zotero and replace the .sqlite file.) Zotero will then sync from the online library 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. 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, 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 ===== ===== Troubleshooting Zotero Data issues =====
  
zotero_data.txt · Last modified: 2023/07/13 17:52 by dstillman