For best results, read from bottom to top, since newer posts build on former posts appearing below.

Saturday, September 16, 2006

Synchronizing EverNote Between Multiple Computers

I've adopted EverNote as my primary tool for taking all forms of notes. For it to truly serve as my "single source of truth" requires the one database be available on all machines I use. Earlier, I described FolderShare as a very useful service for transparently keeping folders in sync across multiple computers. It would seem reasonable to simply keep my EverNote database in a folder that was synchronized between machines. However, there's an important flaw in this strategy: EverNote keeps its database open the whole time the program is in use, and FolderShare cannot write to files that are open. When FolderShare finds it cannot write to a file, it creates a copy on the target machine. The multiple copies typically proliferate, and without attention, they'll contain random snippets of the database, with uncoordinated notes. In short, it's a mess. Now, since this only occurs when the database is open, the problems can be avoided if one remembers to close a running instance of EverNote on one computer before starting one on another machine. This sounds easy enough, but I've forgotten to do this enough times, and cleaned up the resulting mess enough times that I sought a better solution.

Fortunately, my frustration was solved with EverNote 1.5 Beta, which introduces database synchronization. This may sound like it would directly solve the problem, but unfortunately there are two impediments: direct synchronization over a network is not yet officially supported; worse, my computers are behind different firewalls where they cannot directly "see" each other. Therefore I must employ a reflector like FolderShare for synchronization.
There is a way, however, to mix the problematic direct synchronization through FolderShare together with the local synchronization that EverNote provides, yielding a much safer, indirect, yet automatic solution. The trick is this: synchronize a "master" database between all computers with FolderShare, but do not ever open that copy on any machine. Instead, use a second set of databases, unique and local to each machine, which are then synchronized to the master by EverNote.

Here's how to set it up:

0. Before you proceed, play it safe. Backup your current My EverNote Files folder.

1. I'll assume you have a folder called "Common" (beneath My Documents) that is synchronized between all machines using FolderShare. (See my earlier post for how to set this up).

2. Each EverNote database actually consists of 4 files, ending in the extensions .enb, .eni, .enl, and .enr. For your existing database containing your preexisting notes you'd like to make portable, rename the files to "Master", preserving the extension of each file.

3. Move the master database files to the "Common" folder. I preserved the surrounding folder structure, so that files are actually stored in Common\My EverNote Files\DataBases.

4. On one of your machines, open EverNote, and use File/New to create a new database, storing it in a location where it will not be synchronized by FolderShare. You can see in the screenshot that I've stored mine beneath "My Documents", and have given it the name "Local".


5. Choose Options from the Tools menu, and select the "Sync" tab.

6. Ensure the "Enable File Synchronization" option is enabled.

7. Hit the "File Sync Setup..." button, and in the resulting dialog ensure "Local Drives (internal and connected by USB or FireWire) is enabled. Ensure too that the drive letter corresponding the location of your Master database is also enabled. Dismiss the dialog with the "OK" button.


8. Hit the "Database Sync Settings..." button, and make sure that both "Enable synchronization of this database" and "Synchronize immediately when a note is saved" are both enabled. Importantly, make sure that "Synchronize automatically every ... minutes" is disabled. Dismiss this dialog with the "OK" button, and dismiss the "Options" dialog with "OK" as well. With these settings, your Local database will synchronize to the common Master only when you demand it (using Tools/Synchronize) or when EverNote is started or exited, or when a note is saved (typically when you defocus a new or edited note). By limiting the frequency of synchronization with the Master, you are leaving the Master free for synchronization by FolderShare, and reducing the potential for "file open" conflicts.


9. Select "File/Synchronization...", which brings up the following dialog:


10. If you see your Master database listed select it and press the "Link & Sync" button. Go to step 17.


11. If your database doesn't appear below the drive, then EverNote is not looking in the proper places, and you'll need to add the location of your Master database to the set of folders EverNote searches. I'll detail that in steps 12-16.


12. Select the drive containing your Master database and press the "New Sync" button to bring up the following "Create new sync peer" dialog.


13. Enter nothing in this dialog, but do press the "Change..." button to bring up the "Synchronization folder" dialog.


14. Enter nothing in this dialog either, but do press the "Add Folder..." button to bring up the "Browse" dialog.


15. Select the folder containing your Master database. Presuming the conditions in step 1, this will likely be "My Documents\Common\My EverNote Files\DataBases". Click "OK" to accept the addition and dismiss the dialog.

16. Dismiss the "Synchronization Folder" dialog with the "OK" button, and the "New Sync" folder with the "OK" button.

17. You may see a "Synchronization progress" dialog appear, displaying results for this first synchronization between Local and Master. When the process is complete, you may dismiss the dialog with the "Close" button.


18. The remaining "Synchronization for" dialog should now show the Master as linked and synchronized, indicated by a distinctive icon. You can dismiss the "Synchronization for" dialog with the "Esc" key.


19. Repeat steps 4 through 19 on your remaining machine(s). It's important that you don't try to shortcut this by copying the Local database to the new machines. I believe that EverNote may use the uniqueness of each newly created database as an identifier of the database during the synchronization with the Master. If you copy the Local database around, then once one of the Local copies synchronizes to Master, other copies will believe they've done so also, and you'll wind up with orphaned notes that exist in only one of the Local databases. Play it safe, and repeat the steps on all machines.


Now, back in step 8, I mentioned that this two-stage synchronization process limits the duration when the Master is needed. When it's not needed, FolderShare can copy it. However, there will still be some instances, like when you create two notes in rapid succession in Local before FolderShare can release the Master, when EverNote will be unable to synchronize Local to Master. Since an attempt to synch will be made again the next time EverNote tries to save the Local database, this is not a problem, although you will see an error indicator in the bottom right of the EverNote window.

It is possible that contention for the Master may arise when EverNote is synchronizing the Local database to it, during which FolderShare attempts to copy a remote Master onto the machine. In this case, FolderShare will deposit the remote file to a copy, named "Master on ". Since EverNote is smart about whether it has synchronized to a Master or not, it is safe to delete these copies. The true Master will collect the updates from the Local database when the contentious EverNote synchronization concludes, and FolderShare will transport it to the remote machine, where it will receive the "lost" notes from that machine's Local database on the next EverNote synchronization.

1 Comments:

Anonymous Anonymous said...

@tresigner: I'm sorry, I don't know what would cause FolderShare to alter permissions when it updates files. It indeed sounds like it's a good question for the developers of that program. I regret that I don't know enough about the program to help further. One thought though: when you installed FolderShare for your secretary, did you do so in the context of her account? If you did it from your account on her computer (presuming you have an account there), maybe that would explain why the permissions are restrictive. Alternatively, perhaps you could look into storing the files on a FAT drive rather than NTFS drive. I mention this because I believe that permissioning is supported only on NTFS, with FAT partitions being more open. I'm not sure though, so I'd recommend more research before you pursue that route.

1:58 PM

 

Post a Comment

<< Home