Source-Level Backup and Restore

Pro/3 home page  -  documentation overview  -  What is Pro/3?

» PRO3.EXE

 It is strongly recommended to keep complete backup of all knowledge at the source level, both application level knowledge as well as meta knowledge. Pro/3 has good facilities for creating and restoring source level backups.

Source Backup-window

The Source backup-window (in the Backup-menu), includes all the knowledge you need to get a complete source-level backup (i.e. by which you can re-create the KB). Depending on the knowledge type, backup can be made to XML-format or to plain text format either in NL-format or PR-format.

Multi-DB configurations

The Source backup-window only backs up knowledge from the main database. This means that you will have to backup each DB individually in a multi-DB configuration.

Backup

Terminology (-facts)

Most of the application terminology will typically be entered into the KB via standard forms available in the Structure-menu. This means that you do not have source backup available. Backup with the Source Backup-window. 

Sentence model (-facts)

Most of the sentence model knowledge will typically be entered into the KB via standard forms available in the Structure-menu. This means that you do not have source backup available. Backup with the Source Backup-window. 

Annotations (-facts)

Annotations are often entered on-the-fly in the KE Assistant-window. This means that you do not have source backup available. Backup with the Source Backup-window. 

Query, query parameter and query menu (-facts)

Queries and query menu sentences are usually entered from source files (3NL or 3PR), and these files represent a good source level backup. However, if you enter query, query parameter or query menu sentences directly into the KB i.e. from sentence forms, then you should also backup application sentences. Backup with the Source Backup-window. 

Functions

Functions are usually entered from source files (3NL or 3PR formats), and these files represent a good source level backup. However if you enter or change functions via the Function-window in the Rules-menu, then you need to backup the functions with the Source Backup-window. 

Inexact rules

Inexact rules are rarely entered or updated outside the Inexact Rule windows. This means that you do not have source backup available. The best backup-alternative for inexact rules are XML backup via the root rule(s) in the Inexact Rules window, i.e. the XML (NL-based) entire tree/XML (NL-based) entire tree-buttons. These buttons generate XML backups in the appropriate reload order (such that a called rule will be loaded before the rule calling it).

You can also backup inexact rules via the Source Backup-window, however the order is random which could you give you problems when reloading. (You can bypass such problems by turning of integrity checking in the Processing Preferences-window. This is generally not recommended).

Input facilities

Inexact rule input facilities are usually entered from source files (3NL or 3PR formats), and these files represent a good source level backup. The input facilities can be also backed up with the Source Backup-window. 

Sentences rules

Sentence rules are rarely entered or updated the Sentence Rule Editor. Use the Source Backup-window to backup the rules.

Application sentences (-facts)

Application sentences are usually entered from source files (3NL, 3PR or 3DL formats), and as these files represent a good source level backup. However, if you enter or update sentences directly into the KB e.g. from a Sentence-window, then you should also backup application sentences. The Source Backup-window (see under) is one of several possible backup modes.

Table layouts (-facts)

Table layouts are usually entered on-the-fly while using the KB. It is thus useful to back them up via the Source Backup-window.

Public chain declarations (-facts)

Public chain declarations are usually entered in the Public Chain-window. It is thus useful to back them up via the Source Backup-window.

 

Backup Formats (in Source Backup-window)

XML

All backups can be made in XML-format, however all knowledge types other than inexact rules and sentence rules, can alternatively be backed up on NL or PR text format. NL or PR text formats are usually easier to manually review or edit (which occasionally can be useful). These formats are thus generally recommended.

NL - PR

NL-format is easier to manually review or edit, however the backup cannot easily be restored if the terminology has been destroyed or lost. PR-format loads much faster than NL-format. On the balance, NL-format would be the best alternative in most cases.

Restore

Single-DB configurations

If you have a complete source-level backup such as can be created via the Source backup-window, then you can re-create the KB from scratch. However, you have to restore the backup in the right sequence to avoid reference problems (i.e. you have to restore knowledge X before Y, if knowledge Y refers to X). Some of the reference problems can be bypassed by turning off the integrity check option in the Processing Preferences-window. However, this is not recommended, and will only work for some types of referential problems.

  1. Initialize a new KB (with preferably the same name as the original KB - a new name will render database annotations un-referenced - this is of course a very minor issue). Reload the Pro/3 standard knowledge files when prompted. Set preferences and options as appropriate.

  2. Load the terminology backup.

  3. Load the sentence model backup.

  4. Load function backup (declarations and definitions - declarations first).

  5. Load inexact rule backup. The rules must be loaded in the "right" sequence such that any rule R called by rule S, must be loaded before S.

  6. Load input facility backup.

  7. Load the sentence rules backup.

  8. Load the query backup. Query menus (if hierarchical) must be loaded in the proper sequence. Menus must be loaded before queries. Query parameters must be loaded before queries (that use them). Query clusters must be loaded after the queries which form the cluster.

  9. Load the application sentence backup.

  10. Load table layout backup.

  11. Load the annotation backup.

  12. Load public chain declaration backup.

You can now re-derive all sentences (Rederive all implied sentences in the Sentences-menu).

Multi-DB configurations

The process is essentially the same as as described for single-DB configurations, however the operations will have to repeated for each DB.