Menu

XMLTreeEditBackup

Victor

Backup

Starting from version 0.1.0.16 XML Tree Editor provides backup feature to reduce the risk of data loss in the event of hardware/software failure and user errors. The objective for this new feature is that the XML file is re-written as the whole on every content change, so there is possible risk of total file loss, if its structure was damaged by some reason.

How Backup works

When backup is activated XML Tree Editor counts internally every act of saving the content, and when the number of saves reached a certain value, another copy of the XML document is saved onto the disk with the same name, as the original one, and an extra extension ".backup.xx", where "xx" is the backup number. So if one works, for example, with the file named "ABC.xml", one can find backup files in the same folder, called "ABC.xml.backup.00", "ABC.xml.backup.01" and so on. When backup number reached its maximum value (configurable, up to 100), it starts with 00 again, re-writing existing files.

Configurable Options

There are three options to enable/disable backup feature and set up its parameters.

First is a "Tree" menu entry called "Auto Backup". It is also presented in Options under name "allowBackup" with possible values 0 and 1.

The number of backup copies is governed by "backupCopies" integer option, which can be set to up to 100; the default value is 10.

The backup file is saved not on every change, so the number of steps between two backups is set by "autoBackup" integer option. Its default value is also 10.

Recovery Procedures

Let's assume that you accidentally deleted one top level node with all its multi-level contents; the document is still open in XML Tree Editor. One of the possible scenarios for recovery would be:

  1. Disable Backup feature (temporarily)
  2. Open the external file manager, navigate to the folder with the troubled document to see its backup copies
  3. Choose one you think is the best, based on its date/size/backup number or other information
  4. Open the chosen backup as Reference tree and replicate missed node into main document
    OR
  5. Open the chosen backup as main document and save it under its original name; you may lose a few editing steps here
  6. re-enable Backup feature

Related

Wiki: XMLTreeEditHelp

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.