Available for beta testing: Mendeley import
[Update: The Mendeley importer is now available in the release version of Zotero.]
In the Zotero beta, it's now possible to import a Mendeley library directly into Zotero, preserving all item data, folders, tags, notes, linked and stored files, and extracted PDF annotations.
To import a Mendeley library, select "Import…" from the File menu in Zotero. If Zotero finds a Mendeley data directory in the standard location, you'll see a "Mendeley" option, and selecting that will show a list of available databases to import.
[Update: Mendeley very recently made changes that prevent this from working. If you've upgraded to Mendeley Desktop 1.19, see below for a workaround.]
If you have a backup of your Mendeley data directory stored elsewhere on your computer, you can choose the file option instead and just select the Mendeley .sqlite database wherever it's located.
Repeated imports will update and overwrite any collections or items (including notes) you've already imported from Mendeley rather than creating new copies. For collections, that only applies if you choose not to create a collection for the import, which is a new option during imports.
Once you've imported your Mendeley library with the beta version of Zotero, you can either stay on the beta track or switch back to the release version of Zotero.
Known issues:
- It's not currently possible to import items from group libraries. I'm not sure if we'll support this, since it's not clear that we can meaningfully improve on simply copying group items to a collection in your Mendeley library before importing. We could perhaps allow group-to-group mappings, but the group would need to be recreated on the Zotero side anyway.
- Mendeley stores PDF annotations and highlights in its database rather than storing them in the file where they would be accessible to other PDF readers, so we extract annotations to a note stored under the item, with links back to the original page. Highlights are not imported. I believe there's an export option in Mendeley to generate PDFs with annotations and highlights added back to the file, so it might be possible to automate replacing the imported PDFs with those exported versions down the line, but that's not something we've looked into.
- Mendeley seems to allow any field to be added to any type. When importing into Zotero, if a field isn't valid for a given item type, the field is placed into the Extra field. When possible, those will be used automatically in citations (e.g., Original Date), and future versions of Zotero will automatically convert those to any real fields that become available.
- When using the Zotero word processor plugins, document citations created with Mendeley won't currently be linked to imported citations in your Zotero database, but we're hoping to add support for that in a future version.
Let us know if anything doesn't come through how you expect or if you run into trouble.
In the Zotero beta, it's now possible to import a Mendeley library directly into Zotero, preserving all item data, folders, tags, notes, linked and stored files, and extracted PDF annotations.
To import a Mendeley library, select "Import…" from the File menu in Zotero. If Zotero finds a Mendeley data directory in the standard location, you'll see a "Mendeley" option, and selecting that will show a list of available databases to import.
[Update: Mendeley very recently made changes that prevent this from working. If you've upgraded to Mendeley Desktop 1.19, see below for a workaround.]
If you have a backup of your Mendeley data directory stored elsewhere on your computer, you can choose the file option instead and just select the Mendeley .sqlite database wherever it's located.
Repeated imports will update and overwrite any collections or items (including notes) you've already imported from Mendeley rather than creating new copies. For collections, that only applies if you choose not to create a collection for the import, which is a new option during imports.
Once you've imported your Mendeley library with the beta version of Zotero, you can either stay on the beta track or switch back to the release version of Zotero.
Known issues:
- It's not currently possible to import items from group libraries. I'm not sure if we'll support this, since it's not clear that we can meaningfully improve on simply copying group items to a collection in your Mendeley library before importing. We could perhaps allow group-to-group mappings, but the group would need to be recreated on the Zotero side anyway.
- Mendeley stores PDF annotations and highlights in its database rather than storing them in the file where they would be accessible to other PDF readers, so we extract annotations to a note stored under the item, with links back to the original page. Highlights are not imported. I believe there's an export option in Mendeley to generate PDFs with annotations and highlights added back to the file, so it might be possible to automate replacing the imported PDFs with those exported versions down the line, but that's not something we've looked into.
- Mendeley seems to allow any field to be added to any type. When importing into Zotero, if a field isn't valid for a given item type, the field is placed into the Extra field. When possible, those will be used automatically in citations (e.g., Original Date), and future versions of Zotero will automatically convert those to any real fields that become available.
- When using the Zotero word processor plugins, document citations created with Mendeley won't currently be linked to imported citations in your Zotero database, but we're hoping to add support for that in a future version.
Let us know if anything doesn't come through how you expect or if you run into trouble.
This discussion has been closed.
However, I have tried to import my Mendeley DB on Linux. The import finds my Mendeley DB, but I then get the message "The selected file is not in a supported format." (Using Mendeley 1.19)
I booted into Windows to try it there, but the 'Mendeley' option wasn't available in the import dialog (I checked that I was running the 5.0.49 beta).
Any ideas?
Your databases don't appear to be in standard SQLite format, at least from Zotero's perspective. I'm not sure if Mendeley is sometimes writing files in some other format (despite the .sqlite extension) or there's something else going on.
Are you able to open the database in another SQLite tool? (E.g., if you open a terminal window, type
sqlite3
(with a space at the end), drag in the .sqlite file from the filesystem, and press Enter, and then at the 'sqlite>' prompt typePRAGMA integrity_check;
and press Enter, does it say 'ok'?)Edit: With the backup file, it at least finds my folders, but then throws an error, which I've submitted as report ID 235993581.
That's presumably this entry in their changelog: "Improved security" sounds like a good thing, until you realize that 1) encrypting a local database is a pretty rare thing for a program to do, since file protections are generally handled at the OS level by account permissions and full-disk encryption (and anyone using the same OS account or an admin account can already install a keylogger to get all your passwords), 2) it prevents you from accessing the database yourself using standard tools (the way that, say, Mendeley can import from the Zotero database), and 3) this apparently became a priority, after 10 years of not doing it, shortly after Zotero started publicly working on import functionality using the local database. But perhaps it's just a coincidence.
Personally, if I were a Mendeley user, I would contact their support and ask why I can no longer access my own data with standard SQLite tools.
We'll see what we can do to make this easier. In the meantime, if you have a Mendeley database you'd like to move to Zotero, and you haven't yet upgraded to Mendeley 1.19, you should import before upgrading. If you have upgraded to 1.19, you can either try to import from a recent backup or move your database out of the way in the Mendeley data directory, download 1.18, and do a fresh sync to pull down your data from the server, and then do the import into Zotero.
Mendeley 1.18 installers:
To be honest, I wasn't 100% sure it was time to get rid of Mendeley, but now I am! Won't be using an app that wants to lock me in.
However, I still cannot import the mendeley database to zotero. The report ID: 581059188
2) Regarding v1.19 having encrypted database. Isn't it possible to decrypt the database? I mean for Mendeley itself to read the database, it needs to decrypt it.
I am using Mendeley v1.17.13. I highly recommend others to also stick with v1.17.13 if you plan on migrating to Zotero in the future. I had weird issues with v1.18 and group libraries when using Mendeley. So I am guessing Mendeley started to trap users in starting v1.18 and most certainly v1.19 with encrypted database.
I was able to smoothly migrate from Mendeley to Zotero 5.0.49-beta.5+2831e8be3.
Feature request: If a Mendeley item contains a "Star", is it possible to automatically add a tag to all items containing a star during migration? Maybe the tag could be named "mendeley-star". Migration of "Stars" from Mendeley would be amazing! With a huge library in Mendeley and few hundred "Starred" items, automatically tagging during migration would be amazing!
@01baftb: Automate from the Zotero side? We wouldn't make changes to the Mendeley DB. But we'll likely add some options for importing from Mendeley group libraries. Mendeley can decrypt it. Other programs can't — that's the point of the encryption. (It might be encrypted based on the account username and password, but since Mendeley is closed source and they haven't documented the encryption format, there's no way short of complex reverse-engineering to know that, and it'd still make the database very hard to use in most external tools for very little real security benefit (unless, of course, you consider that the security benefit).) Good idea. I've added a star tag for those items in the latest beta. If you re-import it should update items to add tags. (Be aware that it will overwrite any changes you've made to those items since importing. Additional items you've added won't be affected.)
I re-tested the migration with Zotero 5.0.49-beta.7+cfbb3d3d4, it worked very smoothly along with the star tags.