SFPACK32 v0.6.0 Beta 1 - Safety and Backups
===========================================

BEFORE EVERY /WRITE
-------------------

1. Make a current external backup of SFMCONF.DAT and the complete MESSAGE
   directory.
2. Shut down every Spitfire node and prevent caller access.
3. Confirm Event M is disabled.
4. Confirm SFPCKMSG.COM is absent from every active Spitfire home.
5. Confirm Pack Message Base is removed from every active SFSYSOP.MNU.
6. Confirm no other packer, repair utility, mailer, or tosser is working on the
   message base.
7. Run /DRYRUN first and read the report.
8. Select only conferences that are not marked BLOCKED.

BUILT-IN SAFEGUARDS
-------------------

* /WRITE is mandatory for any message-base change.
* SFPACK32 atomically acquires MESSAGE\SFTOSS.BSY for /DRYRUN and /WRITE.
* A caller shown in WORK\SFWHOSON.DAT causes a safety abort.
* An active SFToss32 process or existing foreign SFTOSS.BSY causes an abort.
* Selected files are hashed before and after scanning.
* New PTR, IDX, and DAT files are built and verified before commit.
* A timestamped backup is created and verified before a normal write.
* Final files are verified after commit.
* A detected write failure triggers rollback from verified copies.

BACKUP LOCATION AND CONTENTS
----------------------------

Normal backups are created under:

  <HOME>\SFPACK32-BACKUPS\SFPACK32-YYYYMMDD-HHMMSS\

A backup contains:

* SFMCONF.DAT when present
* SFOUTBOUND.SEQ when present
* every affected PTR, IDX, and DAT file
* affected LMR and SIG files when present

SFPACK32 does not rewrite SFMCONF.DAT, SFOUTBOUND.SEQ, LMR, or SIG during the
current packing phase. They are included when relevant so the transaction can
be reviewed and restored as a complete set.

RESTORE PROCEDURE
-----------------

1. Keep all Spitfire nodes and message utilities stopped.
2. Copy the current damaged or suspect MESSAGE files to a separate evidence
   folder rather than deleting them immediately.
3. Open the exact timestamped SFPACK32 backup named in the report.
4. Copy the backed-up files to their original locations, preserving filenames.
5. Run:

       SFPACK32 /ALL /DRYRUN /V

6. Review the report before restarting Spitfire.

SFTOSS.BSY RECOVERY
-------------------

A normal or handled exit removes only the marker SFPACK32 created. An abrupt
process or system failure can leave the marker behind. Before deleting it:

1. Confirm SFPACK32 is not running.
2. Confirm SFToss32 is not running.
3. Confirm no node or maintenance job is changing the message base.
4. Preserve a copy of the marker for troubleshooting when practical.
5. Delete MESSAGE\SFTOSS.BSY and begin with /DRYRUN.
