In this post I want to shed some light on how you can sync your Zotero library between different computers, and between your computer and Dropbox, a popular cloud storage service. Due to the nature of the matter, what follows is somewhat technical, but don’t let that deter you. Once setup, the synchronization works automatically in the background, without any further effort.
In a previous post, I introduced Zotero, a popular free research tool by the Roy Rosenberg Center for History and New Media of George Mason University. As a brief recap: Zotero allows you to organize all your research sources and create a complete digital library with the click of a few buttons. To learn more about this fantastic tool and why every knowledge worker should consider using it, please check this post.
Recommended approach for syncing Zotero between different computers.
Zotero allows you to synchronize everything via its own cloud storage service, Zotero Storage. “Everything” includes:
- the Zotero data (i.e., the database with all bibliographic information, tags, and notes)
- the Zotero files (i.e. attachments, such as PDF documents, videos, books, and webpage snapshots)
The basic plan (upto 300 MB) is free. 2GB will cost you $1.67 per month ($20 per year), and 6 GB set you back $5 per month ($60 per year). IMO, Zotero Storage should be your first consideration as it is very easy to setup and manage, it is affordable, and your payments support the up-keeping of the infrastructure.
There are, however, some good reasons why you might want to employ a different method to sync your Zotero files:
- You have a very large number of attachments or some very large attachments.
- You have already subscribed to a service like the popular Dropbox, and would rather avoid paying for an additional cloud storage service.
- You have a very slow or expensive internet connection, but have your computers connected via a local area network.
- You are looking for a solution to create a local backup for your files (and database).
(The database is usually below the free storage limit and should always be synchronized via Zotero’s cloud service.)
Here then are some alternative solutions you can employ:
- Sync the Zotero data via Zotero’s cloud service and the files via a storage service that supports the so-called Webdav protocol. This is the second method that is officially supported by Zotero.
- Sync the data via Zotero’s cloud service and the files via Dropbox. Unfortunately, Dropbox doesn’t support Webdav, but there is a different way…
- Sync the data via Zotero’s cloud service and the files via a local network (wireless or wired).
- Backup Zotero to a second hard disk or computer.
Many people are looking for a solution to synchronize Zotero via Dropbox, so in this post, we will take a look at this solution. In future articles, we are going to look at some of the other scenarios.
Controlling how Zotero syncs its database and files
- Open Zotero, and select Preferences:
- Select Sync to control the synchronization
- Type in your account details, and tick Sync automatically to have your database synchronized with Zotero’s cloud service. If you don’t yet have an account, use the supplied link to create one.
- Disable Sync attachment files in My Library to use a service like Dropsync to synchronize your files.
Where is Zotero’s data stored?
Click on Advanced, select the tab Files and Folders. Click on Show Data Directory.
This opens the data folder. In my case the path is F:\Appsdata\zotero:
Note the path to your Zotero data folder as we will need this later in the setup.
Zotero files (i.e., all attachments) are stored in the subfolder storage, which is exactly the folder we have to synchronize via Dropbox.
PRECAUTION: If you are not yet making regular backups of your data, I strongly suggest that you now close your web browser and backup the Zotero data folder, including all subfolders to a safe location, such as an external harddisk.
Update, July 22, 2013:
Aurimas on July 22, 2013 at 9:59 am said: “Symlinks are a bit quirky with DropBox (in my experience on Windows. And this may have since been fixed). DropBox (or Google Drive for that matter) does not really continually scan content inside symlinked folders unlike content in regular folders. So any changes you make to the files do not get updated until the next time you start DropBox…”
I have tested Aurimas’ comment – and indeed, in Windows 7 the synchronization does not happen right away, but rather after a restart of Dropbox or pausing/resuming the synchronization. While this works, it requires an additional step by the user. To keep the sync fully automatic and immediate, I have decided to adjust the procedure below as suggested by Aurimas in his comment. In case you don’t have enough space on the hard disk where Dropbox is located (like myself), or don’t want to move the Zotero storage folder, you can find the original procedure for the first PC here. Just be aware that you then might have to manually trigger the sync by pausing and restarting it. The procedure for PC 2 etc., as described below, does not change.
Unfortunately, Zotero doesn’t allow us to move the folder storage to our Dropbox folder (independently of the data folder). We could, in principle, move the complete data folder to Dropbox, but this should be avoided as Zotero and Dropbox, or multiple computers accessing Zotero via their Dropbox folder might get in each other’s way and corrupt the database.
Help is at hand though: Windows, Mac-OS, and Linux provide so-called symbolic links, an ingenious mechanism that allows us to make a folder visible in a second folder.
What is a symbolic link?
To a program, a symbolic link looks like a normal folder/file. In reality, however, it is a file that contains the path to a destination folder/file. Programs that access the symbolic link are automatically redirected to the destination folder. In our case, by moving our Zotero storage folder to Dropbox, and then placing a symbolic link in our Zotero folder (redirecting to the storage folder in Dropbox), we can make this folder visible to Zotero, yet at the same time allow Dropbox to automatically include this folder and synchronize the contents with its cloud storage.
Moving your Zotero storage folder to Dropbox and replacing it by a symbolic link.
Below, I show how to create the necessary symbolic links in Windows 7/Vista.
- Find out the location of the Zotero storage folder as described above.
- Open your Dropbox folder by clicking on the Dropbox icon and Dropbox folder.
- Note the location of your Dropbox folder as well. In my case, this path is j:\Dropbox
- Check that you have enough space on the hard disk/partition where Dropbox is located to hold the content of the storage folder.
- Close Zotero to prevent it from accessing its data folder. If you are running Zotero in Firefox, close Firefox to achieve this.
- Move the storage folder from Zotero’s data folder to your Dropbox folder.
- Start the Windows command interpreter CMD in Administrator mode:
- Type cmd.exe in the Windows Start Menu.
- Right-click cmd and select Run as administrator.
As a recap, here are the important folders
My Zotero data folder is F:\Appsdata\Zotero
My Dropbox folder is J:\Dropbox
- In CMD, type mklink Your-Zotero-folder\Storage Your-Dropbox-folder\Storage /d
In my case: mlink F:\Appsdata\zotero\storage J:\Dropbox\storage /d
This creates a symbolic link named storage in your Zotero folder. The symbolic link redirects to the folder storage in your Dropbox folder:
If you have an active Internet connection, Dropbox will have already started to upload files from your storage folder. Depending on the speed of your Internet connection and the size of your storage folder, this might take a while.
What have we achieved so far?
- Dropbox automatically backups up all changes to the storage folder to its cloud storage.
- Zotero sees the symbolic link storage which redirects to the storage folder in Dropbox.
- The database is backed up via Zotero’s cloud storage.
How to include a second computer (and further computers) in this scenario?
- For each computer you want to include, install Zotero.
- As described before, configure Zotero to synchronize its database via the Zotero cloud service, and disable file synchronization.
- Install Dropbox (if not yet done), and allow for the Dropbox folder to be downloaded. This will include the Zotero storage folder (uploaded from our first computer), including all files contained.
On the second PC (and further PCs) we also have to create a symbolic link named storage in the Zotero data folder that redirects to the folder storage in Dropbox. If the folder storage already exists in your Zotero folder (on the second PC), you have to delete this folder. Since we assume here that you have performed a fresh Zotero installation, this folder should still be empty.
- Note the location of your Zotero folder and your Dropbox folder on the second PC (as described above for the first PC)
- If the folder storage exists in your Zotero folder, make sure that it is empty. Instead of moving it, you have to delete it to create a symbolic link. Close Zotero before you delete this folder.
- Start cmd.exe in Administrator mode (as described earlier) and create a symbolic link as follows:
Type mklink Your-Zotero-folder\Storage Your-Dropbox-folder\Storage /d
This creates a symbolic link named storage from your Zotero folder redirecting to the folder storage in your Dropbox.
- Double-click the link storage in your Zotero folder to check if it works:
That’s all there is to synchronizing your Zotero files between different computers via Dropbox. To include further computers, just follow the template for the second PC, outlined above.
I hope this post provides a useful solution to you, my valued reader. Please don’t hesitate to leave a feedback. Have a great day!