The location is ~/Library/Containers/com.apple.Notes/Library/Notes/
Very helpful William, thank you. Do you anticipate there would be any problem replacing files in this folder manually? I'm helping my wife switch iCloud accounts and I've consolidated all notes to her old iCloud account, and backed up these files. I intend to replace these files into this folder after switching iCloud accounts and restarting. Is there anything else you would suggest I do? Thanks for the help ~ Jeremy
I know this is a late response and you have probably resolved your issue by now. When looking for a way to recapture some lost data from notes I stumbled on your question and viewed most of this thread. I was surprised at the snarky complaining, since, if you were used to using a PC (especially back to the DOS days) you would have recovered the info in an autoexec.bat or config.sys file from the .bak file using the technique I will describe below. (By the way those files still exist in windows, they are just covered up by layers and layers of crap).
The location of the data folders is as noted in the June 2014 response. Not hard to find providing you make the Library and user folders visible. I am surprised that the work-arounds seem so complicated, and use 3rd party software (stuff like that I have grown to generally distrust) that is itself windows based. My solution was to turn off my connection to the internet/cloud and copy the current data files in the Notes folder to another location on an external drive. I cut off my internet connection so the data files would not sync to the cloud based notes files. I "restored" the data files from time machine to my desktop and overwrote the data in the Notes Library folder. I opened notes and copied data I needed to a text file of some kind. You can also send the data to pdf. I then overwrote the earlier notes data files with my most recent ones that were saved elsewhere, and then pulled in the old info that I was trying to recover. Not complicated. A bit tedious. Care has to be taken to avoid corrupting the data file. But none of this is a reason to throw out a mac for a pc. Think of all the benefits, not the fact that one application is not to your liking. And if you have over 2000 of these things, there are much better ways to save data than notes. Evernotes was mentioned, but there are others. I don't believe Apple ever intended for Notes to be used as a large database.