As I mentioned in a previous post, I am in the process of "Going Paperless." I have decided to use Evernote as my digital repository. (I love the tags!!) One important requirement of my new information repository system is that there has to be a way to back up my data. Unfortunately, Evernote does not include a built-in backup option; however, there is a command line utility to export notes. Since I am semi-dangerous with scripting, I decided to write a batch file to create a consistent and automatic backup system.
The script does the following:
- Checks the registry to make sure Evernote is installed
- Gets the Evernote installation path from the registry
- Create a folder based on the day and time
- Enumerates the notebooks
- Separately exports each notebook
- Compresses each export
- Adds a note to each notebook with a status of the export
exportNotes command exports notes based on a query into a new notebook. This means that if all notebooks are exported in one shot, the notebook organization is lost. By exporting one notebook at a time, the notebook structure can be recovered as well as the notes. So, if something catastrophic where to happen, time is not wasted reorganizing thousands of notes.
To make the backup happen automatically, I use the Windows Task Scheduler to run the script every day at 1800R.
Please let me know if you find this information useful or have any suggestions on how to improve it.