Snapshots and Backups - tomboy-notes/tomboy-ng GitHub Wiki

Snapshots and Backups

Recovering Lost Notes

If you are reading this, odds are you are worried ! So, first bit of advice is don't panic (1) Its quite possible we can help you. That will depend on whats happened and if you have enabled auto snapshots (or took a manual one recently). Firstly, don't do a sync. Thats to prevent bad data replacing what might be good data currently not obvious to you. Next, take small steps.

Lets look at the possibilities -

I (or the sync) deleted a note I need

That just might be easy. We keep a backup copy of every note you manually delete or is overwritten during a sync. But only one copy so if its been synced and overwritten again, its gone. Check by going back to the BackUp tab, click "Show Me", browse through the old notes there and and double click a likely candidate. You get a dialog that lets you view, delete or recover that note.

I have a corrupted note.

When you start tomboy-ng up, you see a warning about an inability to index a note. That probably means the note's XML has somehow become corrupted (2). The indexing mechanism in tomboy-ng is deliberately very strict in what it will accept, it errors if one field is unobtainable. However, depending on where the XML error in the note is, you can open it, decide if what you see is a good compromise and save it back with rewritten XML.

To try this quick fix, you should -

  • From the SnapShot tab, click "Recover one or more lost notes".
  • In this window, under "bad Notes in Notes Directory" is a list of just that. Double click a likely candidate and a new Edit window will open. If you see little or none of the content you expect, don't touch it, just close the window, there are better options (3).
  • If it looks like what you need is still there (or enough), make a trivial change to force a save and exit.
  • You might want to back out now, click "Refresh" in the Search window. Good luck !

You're not listening, I have lost all my notes !

OK, I get you, this is serious. But we at have two paths left, lets see -

I sync my notes from somewhere else. Oh, that's good. Maybe all you need do is clean out your current notes directory (4) and rejoin the sync network. Note, I emphasise, not just do a sync. You MUST go to the sync tab and click "Set File Sync Repo". That way, the sync system sees you as a new friend and sends you a full set of notes. Just how good an approach this is depends on how recently you last synced, obviously any changes since last sync will be lost.

I have a snapshot Great news ! You can easily choose to roll back to a particular snapshot and blow away all your troubles. Too Easy ! If you wisely kept the snapshot elsewhere, copy it to your snapshot directory (shown on the settings -> snapshots tab).

  • From the SnapShot tab, click "Recover one or more lost Notes". If you have not already, now would be a great time to click "Safety Snapshot", you are in seriously dangerous space right now.
  • Go to the "Recover Snapshot" tab, choose the snapshot you wish to use and away you go (5). Back out, go to the Search and click "Refresh". After you have checked all is good, please remember to take a snapshot every now and again !

Notes

(1) By Douglas Adams, used without permission.

(2) Corrupted notes should never happen, looks like it did. Power failure, program error, whatever. If its my fault, I am sincerely sorry ! Please report this experience to the Tomboy mailing list or Github. The only way I can rid of these problems is if people tell me about them.

(3) In a classically corrupted XML file, the problem is often only one or two characters. If you open that note in a plain text editor, you will see the content and all the XML. Tomboy-ng has given you the line number where its unhappy, somewhere about there is an error, you may be able to edit it, save and either reload tomboy-ng or press the "refresh" button in the Search window. Don't try to use anything other than a plain text editor, if this is unclear seek help first.

(4) Tomboy-ng tells you where your notes are stored, go there with a file manager and select all the note files. They are the ones with a 36 apparently random character name and ".note" extension. Only do this if you are a sync user !

(5) If you (wisely) keep a copy elsewhere, bring it back, un-encrypt it if necessary. And, good work !