Recently when I was backing up and restoring Mendeley database, Mendeley had a "hickup" which made Web and Desktop databases out of sync. More specifically "4400 our of 5500 files deleted, do you want to proceed?" type of out of sync (sounds familiar to anyone?). 1.5GB worth of pdf files out of sync. If I tried to sync the two, Mendeley would wipe out my local library AS WELL AS the pdf files, and no matter what I did I could not find a way to make it copy the local library to the web. Whether I made changes in local library to make it more recent and then synced, whatever, Mendeley happily decimated my local library and wiped out my local pdf files. I don't know whether Mendeley has some weird time zone glitches so one needs to wait a week for Web lib to become outdated, whatever, it just didn't work for me despite their "how sync works" theory on this support forum. So here are some guidelines for those of us who are about to back up Mendeley library, that I hope will be helpful to many others, learned the hard way.
1. Before backing up/restoring Mendeley database make YOUR OWN BACKUP of your entire library files. First, make a local copy of all your pdf files. It may be best to use Mendley's "organize library" feature before that, to put all your files in one folder. Then just make a copy of that folder and save it in a safe place. YES, MENDELEY WILL HAPPILY DELETE YOUR LOCAL PDF FILES IF THINGS GO BANANAS. Second, make an independent backup of Mendeley's database files. These can be found in your "{windows-user-directory}\AppData\Local\Mendeley Ltd\Mendeley Desktop" folder. You may need to enable hidden files in explorer to find it, or just type this path directly into your explorer's address bar. For me this was "C:\Users\gmyuriy\AppData\Local\Mendeley Ltd\Mendeley Desktop\". Once in that folder, take the files that look like "gmyuriy@hotmail.com@www.mendeley.com.sqlite" and "monitor.sqlite" and put them in a safe folder. YES YOU CAN ALWAYS RESTORE YOUR LOCAL MENDELEY TO ITS ORIGINAL STATE BY RESTORING YOUR PDF FILES FOLDER AND DRAGGING THESE TWO FILES BACK TO Mendeley's "AppData\Local\..." FOLDER.
2. If Mendeley went bananas during the restore, this is how you can get your library back: copy your pdf library back from your pdf library backup, and drag the sqlite files back into Mendeley's "AppData\Local\..." folder. This will restore your Mendeley's state to the before-the-crash conditions. Also note that even if Mendeley deleted your local pdf files, it doesn't really delete them, they still can be found in "Archive" subfolder of your pdf library's folder.
3. If your pdf links went broken, select all your pdf files in the pdf library in explorer and drag them onto any one entry in your Mendeley Dekstop entries list. Mendeley will parse the dropped files and try to resolve the links based on pdfs' hash values. This mostly worked for me, so I can recommend this method (sort of).
4. To restore sync between your Web and Desktop libraries, First, after restoring your library using your manual backups, make a new backup using Mendeley's builtin backup function. Second, go to your Mendeley's website, go to Library, and manually wipe it by deleting all files in your "All documents" folder and then emptying trash. Third, go to your Mendeley's desktop and select "Restore from backup" function using the backup you just created. This will wipe out both your local and remote data, copy your local data to Mendeley Web, and then copy it back. You need to manually wipe your Web library because Mendeley servers chock and die over "restore from backup" if your library is big enough. Fourth, although this will mostly get your library back, you may notice few hundred files missing in your library. To fix this up repeat the manual restore of the pdf files and the Mendeley's sqlite files in step 2. This will give back your local library, but be aware that Mendeley may still try to delete these files if you let it sync your libraries again. Don't let Mendeley sync libraries for some days, then make an update in your local library to make it newer then the Web, and try syncing again at a later point (without touching your Web library in between).
5. If after all these exercises you have had enough of Mendeley Web sync peculiarities, here is how to disable the sync completely - go to Mendeley Web and change your password there, but do not change your password in Mendeley Dekstop. This will prevent Mendeley from accessing your Web account and creating sync-problems for you in the future.
↧