So you’ve saved a lot of notes into Evernote and you’re wondering how to back them up in case something goes horribly wrong. Some might call you paranoid, but a glitch in a client update could wipe out your notes (and because Evernote syncs to the cloud it would wipe out all your notes in the cloud too).
Even if you’re not worried about Evernote causing you a headache (and they certainly have a good record for data reliability), you should worry about yourself. There is no system in place powerful enough to protect you from accidentally or misguidedly deleting your own stuff. Once you drop the hammer on your own data, Evernote (like any other automated synchronization tool) isn’t going to judge you, it’s just going to carry out your orders and wipe your data.
So how can you backup your data?
Firstly, you will need to install the Evernote for Windows client onto your machine.
Now with that done, the easiest way is to create an export of all your notes in Evernote’s ENEX format, which will allow you to pick and choose which notes you want to recover when the time comes. This can be done from within the Evernote client, but we want to automate this so that it happens regularly and without human intervention.
This is where the Windows scheduler comes in. Simply schedule a task to run at whatever frequency you wish, and have it run the following command (you may need to adjust the path to your ENscript.exe file, depending on where Evernote is installed on your system):
"C:Program Files (x86)EvernoteEvernoteENScript.exe" exportNotes /q any: /f c:usersRobertdropboxmy_evernote_backup.enex
So bring up the Task Scheduler, and add a new task similar to the one below (click each screenshot to see full size):
In my case, I write the export file to my Dropbox folder so that the file gets automatically backed up to the cloud (providing yet another backup of this important data).
Keeping multiple backups
I have created a batch file (to be called from the scheduler) which not only performs the export but which also maintains a specified number of backups (deleting old ones). Using this script you could, for example, schedule a weekly backup and keep 4 weeks worth of backups available in Dropbox with older backups being deleted automatically.
Download Evernote Backup.bat and open it with a text editor (such as Notepad) to update the location of the Evernote installation (line 14), destination directory for backups (line 17) and the number of backups to keep (line 23) as appropriate for your installation.
::========================================================= :: Script Name : Export_evernote.bat :: Description : Exports all notes to a backup, keeping the :: : last <n> backups. :: Author : Robert Taylor :: Date : 29 August 2013 ::========================================================= :: --- :: Setup variables and parameters :: --- :: location of Evernote set ENdir=C:\Program Files (x86)\Evernote\Evernote :: location to write the backups to set expdir=d:\dropbox\apps\evernote :: The name of the directory to be created to contain the notebook exports (will be prefixed by the date/time) set groupdir=evernote_backup :: number of logfiles to keep set /a keep=8 :: --- :: Export Notes :: --- :: generate date and time varibles for /f "tokens=1,2,3 delims=/ " %%i in ('date /T') do set thisdate=%%k%%j%%i for /f "tokens=1,2 delims=: " %%i in ('time /T') do set thistime=%%i%%j set prefix=%thisdate%_%thistime% :: do the export mkdir "%expdir%\%prefix%_%groupdir%" for /F "tokens=1 delims=" %%i in ('"%ENdir%\enscript.exe" listNotebooks') do "%ENdir%\ENScript.exe" exportNotes /q "notebook:\"%%i\"" /f "%expdir%\%prefix%_%groupdir%\%%i.enex" :: --- :: Delete old logs :: --- :: make list of files type NUL > explist.dat for /F "tokens=1,2 delims= " %%i in ('dir /B *%groupdir% ^| find /N "%groupdir%"') do echo %%i = %%j>>explist.dat :: count total number of files for /F "tokens=1 delims=" %%i in ('type explist.dat ^| find /C "%groupdir%"') do set filecnt=%%i :: Create a list of files to delete set /a todelete=%filecnt% - ( %keep% ) type NUL>dellist.dat for /L %%i in (1,1,%todelete%) do find " %%i = " explist.dat >> dellist.dat :: Delete the old files for /F "tokens=3 delims= " %%i in ('find "%groupdir%" dellist.dat') do rmdir /S /Q %%i :: Remove temporary working files del /Q explist.dat del /Q dellist.dat :end exit
Change the scheduler configuration you added earlier to run the bat file rather than the ENscript executable. As an example:
As an aside, running a bat file from the Windows Scheduler has the annoying effect that a DOS window suddenly appears in the middle of the screen for the duration of the backup. If you want to avoid this, see my related post Starting a Batch (DOS) file minimized