Skip navigation.

bpm's Operations Room

understanding & extending Opera

Data-loss defect in the Notes system, and a quick backup to keep your notes safe

(last edited 2009-11-7) (green links are button-installer tags)

Yesterday my Notes.adr file suddenly shrank from 260 KB to 13 KB. It's a jolt: most of your folders just gone. There are at least two big flaws in the note system that can wipe out data - irretrievably, if you don't have backups. One fixed, Oct. 2008 Luckily I had lots of backups, stacked and ready to reinstall - because I have a Baknotes item on my File menu, and enough bad experiences to make me click it after putting anything important into Notes.

Here are pointers to threads about the flaws, and Baknotes: a DOS utility Windows users can copy off the screen, and run from a menu or a button to take most of the sting out of what can indeed happen.


The now-fixed flaw: if you started the second line of text in a folder note (in which you are invited to put text) with a dash (which is very natural, since dashes commonly start items on lists), then the next time you loaded Opera your Notes file ended at the dash. Everything below that in My View WAs gone. Reported Feb 2006; fixed Sept 2008. Here's the forum thread about it.

The second flaw is one which must be coming into play a lot - but perhaps leaving people confused enough to be not quite sure what they saw, or if perhaps they're just imagining things. It involves instances of notes open in two windows competing for control of the file - and annihilating each other's edits. Read here.

If you want to experiment and see it in action, make a copy of notes.adr before you start - and then delete the one you've damaged after your trials, and rename the intact one notes.adr.

Here's Baknotes. When run, it makes a copy of notes.adr in a backup folder - and then prompts you about putting it into a stack. Stacks are a way of keeping snapshots you can go back to. I've set up two, each five deep. The idea is that if you notice that something's missing - but not right away - you will be able to find it somewhere in the archive. There's a short-term stack (to be used, say, every hour or so) and a long-term stack (say, every few days). You'll see "file not found" messages the first few times you use a stack: it isn't populated yet, and the commands cite files that don't exist. It does no harm, and stops after a few saves.

For instructions on how to set up the utility, please see my earlier blog item about a general backup program - procedure here is just the same; once again, I'd recommend making a C:\utility folder to put the file in (which is what the menu line & button here assume). Adjust the path statement in the second line to whatever your Profile path is. (Both utilities are also bundled in the omnibus program Filecopier.)

You can run Baknotes in various ways:
  • leave a shortcut to it on the Start menu or desktop
  • put this line on your File menu: Item, "Baknotes"=Execute program,"C:\utility\Baknotes.bat"
  • drag this button to a toolbar: Baknotes

@prompt $G
@cd c:\windows\"application data"\Opera\Opera
@xcopy notes.adr ..\backup\notes\ /d /y
@echo Notes copied to backup folder (unless unchanged).
@cd ..\backup\notes
@set /p save= Save to stack? 1: no 2: short-term 3: long-term :
@if '%save%'=='3' goto long-term
@if '%save%'=='2' goto short-term
@goto end
:short-term
@del notes_S5.adr
@ren notes_S4.adr notes_S5.adr
@ren notes_S3.adr notes_S4.adr
@ren notes_S2.adr notes_S3.adr
@ren notes_S1.adr notes_S2.adr
@copy notes.adr notes_S1.adr
@echo Added to short-term stack.
@goto end
:long-term
@del notes_L5.adr
@ren notes_L4.adr notes_L5.adr
@ren notes_L3.adr notes_L4.adr
@ren notes_L2.adr notes_L3.adr
@ren notes_L1.adr notes_L2.adr
@copy notes.adr notes_L1.adr
@echo Added to long-term stack.
:end
@echo.
@echo Backup complete. (Alt+F4 dismisses.)


One more thing worth mentioning is that you can manage your notes - splitting off archives you may want to consult once in a while but don't need every day, for example - by means of the Notesfile preference. This is where you can specify the notes file to be loaded. You have to restart Opera for it to take effect. To make an archive, you would copy your notes.adr under another name, say 2007notes.adr, and then delete the 2007 stuff from notes.adr, and the non-2007 stuff from the archive.

log: learnings & developmentsprivacy button: profile rewind via fileswap (obviously)

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.