Chapter 7: Analysis and recovery
Physical recovery
A healthy encrypted file is decrypted with the export and Replace procedure in Chapters 4 and 6. Physical recovery is for a damaged file. Restore a verified backup when that is the appropriate way to recover the database.
Choose the recovery route from the file's actual condition.
| Condition | Action |
|---|---|
| Encryption mismatch or FI_CRYPT | Restore the correct configuration before changing files or keys |
| Missing or damaged index, with a readable datafile | Follow Decide whether to rebuild a missing or damaged index |
| APPX can export every required record | Preserve and check the complete export; recreate the file with Replace under the intended encryption settings |
| Damaged encrypted APPX 6.2.1 file | Use a compatible 6.2.1 engine on working copies, then rebuild and verify as described below |
Use an APPX 6.2.1 engine with the matching file format, structures, administration configuration, and encryption settings. Do not use a different release's engine as a shortcut for recovering an older physical file.
In the APPX 6.2.1 recovery test, nine active records survived recovery and an index rebuild after a record was deleted. Their complete exported values matched the export made before recovery. The check included a NATIONAL field and its index. Separate copies with a damaged or truncated final record each recovered the other eight records with unchanged values and reported the lost record as an error. A record that cannot be recovered still requires a backup or other trusted source.
- Stop all access. Preserve the original datafile, index, structure, administration backup, and key records.
- Work in a separate restricted directory. Choose a new output filename that does not already exist. Never use the source filename as the destination.
- Run the recovery utility and retain its entire log. The following Unix example uses the example paths described in the previous topic.
/opt/appx/appx -recover /srv/appx-recovery/PROSPECT.dat /srv/appx-recovery/PROSPECT-new.dat
For Windows PowerShell, substitute your own paths:
& 'C:\APPX\appx.exe' -recover 'C:\APPX-Recovery\PROSPECT.dat' 'C:\APPX-Recovery\PROSPECT-new.dat'
- Review the number of active records copied, deleted records removed, and errors found. Investigate skipped or damaged regions; a completed run alone does not establish that all required data was recovered.
- In a separate test database with matching structures and encryption settings, put the recovered
.datunder the expected file name. Preserve the old index separately. - Select only that test file in Data File Management and run Rebuild key Files. The recovered datafile requires a new matching index. Do not reuse the original
.keyfile.
- Run Verify Integrity of APPXIO Files. Compare counts and application values, and compare a normal APPX export with a known-good export when available.
- Accept a recovered file only after the data and application checks are satisfactory. Plan any replacement of live data as a separate controlled restoration.
Do not use the recovery utility's -c option as a decryption or CSV-export shortcut. Keep deleted-record outputs, dumps, and recovery logs restricted. They may contain sensitive information.