Skip to content

Restore files and recover a contest

The current contest log is a SQLite database. Older instructions for rebuilding or copying a legacy binary log are not the recovery procedure for this version. Ctrl+R, described as “Restore last entry” in the old shortcut list, is an entry-editing action, not database restoration.

Resume after a full disk

If TR4W can open the database read-only, you can review the log while writes are blocked. A refused QSO stays in the call and exchange fields and the QSO not saved panel remains visible. Free space on the drive named in the notice, then press Enter to retry the retained entry. Confirm the QSO appears in the log and the writable notice clears the error. On a multi-op station, verify catch-up before continuing.

One Enter saves all linked county-line, multi-park or rover rows in one transaction. A refused save leaves the entry available for retry and sends no contact to the server, external loggers, or UDP. Edit QSO and Alt+Y also keep the edit available when the database refuses it.

Correct station facts already logged

Choose Tools → Correct Station Facts… and select the station fact to repair, such as the CQ zone.

Correct station facts dialog with the field selector open, showing State, Section, CQ zone, ITU zone, Grid, and other facts

Review the affected and skipped row counts before confirming. The confirmation defaults to Cancel. TR4W takes a verified backup, applies the change in one transaction, sends edits to connected systems, and rescores. Imported contacts, rows that never recorded that value, and applicable rover rows are skipped. In Edit QSO, you can inspect or correct individual station facts.

Restore a verified log snapshot

  1. Stop logging and close TR4W. Preserve the current contest folder before replacing anything, including any .db-wal and .db-shm files that remain. Keep the originals together and untouched for investigation.
  2. Locate the most recent successful TR4W backup. Start with the reported local snapshot in the writable settings folder's backup directory; an optional external destination holds a separate background copy. The snapshot's .bak is the prior snapshot. A .new file needs the backup result/log checked before treating it as a valid backup.
  3. Make a separate working copy of the chosen snapshot in a recovery folder. Give the copy a .db extension if the backup filename has another extension, so it can be selected as a database. Keep the backup itself unchanged.
  4. Start TR4W and open that copy as an existing contest. TR4W performs database identity, version, integrity, and foreign-key checks during opening. If it refuses the file, retain the error and diagnostic log; do not work around it by creating an empty file over the original.
  5. Verify the contest, station identity, contact count, recent QSOs, and score. Determine which QSOs occurred after the snapshot. Reconcile them from independent records before continuing; a successful open alone does not show that the backup contains every contact.
  6. Choose the verified recovered database as the continuing log and set its backup destination appropriately. Keep the original and recovery evidence until reconciliation is complete.

Do not attach old live-database WAL files to a restored snapshot. Use a fresh recovery folder so sidecars from a different database cannot be mixed with it. For a database recovered from a disk rather than a TR4W snapshot, preserve the database and its matching sidecars together and work on copies.

Restore settings and reference files

Item Recovery approach
tr4w.json station settings and window layout With TR4W closed, retain the current file and restore a known-good copy to the actual settings path. This can restore older radio addresses and window positions; check them before operating. Passwords and API keys stored in the OS credential store are not included in this file; re-enter them when moving to another computer.
CTY.DAT and TRMASTER.DTA Restore saved copies or use the reference-data download procedures. Follow the reload/restart instructions.
Custom DOM and other contest support files Recover from your station archive. A generic download may not reproduce custom multipliers or local definitions.
ADIF/Cabrillo/CSV exports Keep as independent evidence and deliverables. They are not substitutes for a complete database/settings backup. See importing for the supported import route.

The database snapshot does not back up the entire station configuration. See files and folders for platform-specific locations, and window recovery if the problem is only an off-screen window.

Source check and review boundary

Current snapshot behavior: domain/uLogBackup.pas; database opening/validation: uLogStore.pas and uLogDatabase.pas. This is a conservative copy-first recovery procedure derived from those paths. A complete GUI restore rehearsal remains to be performed; no user's log was restored or overwritten while writing this guide.