feat(dataforth-dos): Add ATESYNC orchestrator and CTONW upload fix
ATESYNC.BAT v1.0: - Boot-time orchestrator (ARCHBAT equivalent from TS-27) - Calls CTONW (upload) then NWTOC (download) - Creates machine folder structure if missing - Accepts machine name as parameter or MACHINE env var CTONW.BAT v3.1: - Fixed upload path: now uploads to T:\%MACHINE%\LOGS\*LOG - Added safeguards to prevent data overwriting: - Refuses to run if MACHINE not set - Refuses to run if T:\%MACHINE% folder missing - Logs machine name, date/time, target path - Uploads all 8 LOG folders plus Reports Based on analysis of TS-27 golden example machine backup. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
**Project:** Dataforth DOS Update System
|
||||
**Client:** Dataforth
|
||||
**Duration:** ~2 hours
|
||||
**Status:** DSCDATA sync issue fixed, batch files updated
|
||||
**Duration:** ~4 hours
|
||||
**Status:** DSCDATA sync fixed, CTONW upload fix, ATESYNC orchestrator added
|
||||
|
||||
---
|
||||
|
||||
@@ -29,6 +29,29 @@
|
||||
4. **Git Checkpoint Created**
|
||||
- Commit: fd24a0c - "fix(dataforth-dos): DOS 6.22 batch file improvements and sync fix"
|
||||
|
||||
5. **Diagnosed Database Import Issue**
|
||||
- Test results weren't making it into testdatadb SQLite database
|
||||
- Root cause: CTONW.BAT was uploading to wrong location (ProdSW instead of LOGS)
|
||||
- testdatadb runs on AD2 port 3000, imports from LOGS folders
|
||||
|
||||
6. **Fixed CTONW.BAT (v3.0 -> v3.1)**
|
||||
- v3.0: Added proper upload to T:\%MACHINE%\LOGS\*LOG folders
|
||||
- v3.1: Added machine verification safeguards to prevent data overwriting
|
||||
- Now refuses to run if MACHINE variable not set
|
||||
- Logs machine name, date/time, and target path
|
||||
|
||||
7. **Created ATESYNC.BAT v1.0 (ARCHBAT Equivalent)**
|
||||
- Boot-time orchestrator for DOS machines
|
||||
- Calls CTONW (upload) then NWTOC (download)
|
||||
- Creates machine folder structure if missing
|
||||
- Based on TS-27 original ARCHBAT.BAT
|
||||
|
||||
8. **Analyzed TS-27 Golden Example**
|
||||
- TS-27 Backup/ORIG contains full machine backup
|
||||
- Compared original boot process to new setup
|
||||
- Original uses %1 parameter, new uses %MACHINE% environment variable
|
||||
- Original downloads from per-machine T:\%1\ProdSW, new uses centralized T:\COMMON\ProdSW
|
||||
|
||||
### Key Decisions Made
|
||||
|
||||
1. **Use COPY instead of XCOPY for all operations**
|
||||
@@ -165,6 +188,30 @@ Output (after fix):
|
||||
- Switched all XCOPY to COPY
|
||||
- Simplified output messages
|
||||
|
||||
**CTONW.BAT (v3.1)**
|
||||
- Path: `/Users/azcomputerguru/ClaudeTools/projects/dataforth-dos/batch-files/CTONW.BAT`
|
||||
- Deployed to: NAS `/data/test/COMMON/ProdSW/CTONW.BAT`
|
||||
- Deployed to: AD2 `C:\Shares\test\COMMON\ProdSW\CTONW.BAT`
|
||||
- Changes:
|
||||
- Uploads test results to T:\%MACHINE%\LOGS\*LOG (machine-specific)
|
||||
- Refuses to run if MACHINE variable not set (prevents overwriting)
|
||||
- Refuses to run if T:\%MACHINE% folder doesn't exist
|
||||
- Logs machine name, date/time, target path to C:\ATE\CTONW.LOG
|
||||
- Uploads 8 LOG folders: 5BLOG, 7BLOG, 8BLOG, DSCLOG, HVLOG, PWRLOG, SCTLOG, VASLOG
|
||||
- Also uploads Reports and batch files
|
||||
|
||||
**ATESYNC.BAT (v1.0) - NEW**
|
||||
- Path: `/Users/azcomputerguru/ClaudeTools/projects/dataforth-dos/batch-files/ATESYNC.BAT`
|
||||
- Deployed to: NAS and AD2
|
||||
- Purpose: Boot-time orchestrator (ARCHBAT equivalent)
|
||||
- Usage: `CALL ATESYNC TS-27` or `SET MACHINE=TS-27` then `CALL ATESYNC`
|
||||
- Features:
|
||||
- Accepts machine name as parameter or uses MACHINE environment variable
|
||||
- Creates machine folder structure if missing
|
||||
- Calls CTONW first (upload test results)
|
||||
- Then calls NWTOC (download updates)
|
||||
- Error handling with clear messages
|
||||
|
||||
**Sync-FromNAS.ps1 (on AD2)**
|
||||
- Path: `C:\Shares\test\scripts\Sync-FromNAS.ps1`
|
||||
- Changes: Added new section to sync Ate/ProdSW folder:
|
||||
@@ -211,11 +258,13 @@ if (Test-Path $ateProdSwPath) {
|
||||
### Immediate
|
||||
- [x] DSCDATA files synced to NAS (completed)
|
||||
- [x] Sync script updated to include Ate/ProdSW (completed)
|
||||
- [ ] Test on a DOS machine to verify files copy correctly
|
||||
- [x] CTONW.BAT fixed to upload to correct LOGS folders (completed)
|
||||
- [x] ATESYNC.BAT created as ARCHBAT equivalent (completed)
|
||||
- [ ] Test ATESYNC and CTONW on a DOS machine
|
||||
|
||||
### Future
|
||||
- [ ] Investigate test data database on AD2 port 3000 (user mentioned, couldn't access)
|
||||
- [ ] Document the testdatadb application if found
|
||||
- [x] Investigate testdatadb on AD2 port 3000 (found - Node.js/Express with SQLite)
|
||||
- [ ] Document the testdatadb application fully
|
||||
|
||||
---
|
||||
|
||||
@@ -224,9 +273,10 @@ if (Test-Path $ateProdSwPath) {
|
||||
### File Versions (Current)
|
||||
| File | Version | Date |
|
||||
|------|---------|------|
|
||||
| ATESYNC.BAT | 1.0 | 2026-01-21 |
|
||||
| CTONW.BAT | 3.1 | 2026-01-21 |
|
||||
| NWTOC.BAT | 3.5 | 2026-01-21 |
|
||||
| DEPLOY.BAT | 2.4 | 2026-01-21 |
|
||||
| CTONW.BAT | 2.5 | 2026-01-20 |
|
||||
| UPDATE.BAT | 2.3 | 2026-01-20 |
|
||||
| CHECKUPD.BAT | 1.3 | 2026-01-20 |
|
||||
|
||||
@@ -270,12 +320,40 @@ Admin deposits files on AD2
|
||||
|
||||
## Session Metrics
|
||||
|
||||
- **Session Duration:** ~2 hours
|
||||
- **Issues Fixed:** 1 major (DSCDATA sync)
|
||||
- **Files Modified:** 3 (NWTOC.BAT, DEPLOY.BAT, Sync-FromNAS.ps1)
|
||||
- **Git Commits:** 1
|
||||
- **Session Duration:** ~4 hours
|
||||
- **Issues Fixed:** 2 major (DSCDATA sync, CTONW upload path)
|
||||
- **Files Created:** 1 (ATESYNC.BAT)
|
||||
- **Files Modified:** 4 (NWTOC.BAT, DEPLOY.BAT, CTONW.BAT, Sync-FromNAS.ps1)
|
||||
- **Git Commits:** 2
|
||||
|
||||
---
|
||||
|
||||
**Session End:** 2026-01-21 13:50
|
||||
**Next Session:** Test NWTOC on DOS machine, investigate testdatadb
|
||||
## TS-27 Golden Example Analysis
|
||||
|
||||
TS-27 backup located at `/data/test/TS-27/Backup/ORIG/` contains:
|
||||
- Full machine backup (AUTOEXEC.BAT, CONFIG.SYS, all folders)
|
||||
- Original batch files in BAT/ folder
|
||||
- Original ATE folder structure
|
||||
|
||||
### Original Boot Sequence (TS-27)
|
||||
```
|
||||
AUTOEXEC.BAT
|
||||
-> CALL STARTNET.BAT (maps T: and X: drives)
|
||||
-> CALL ARCHBAT.BAT TS-27 X:
|
||||
-> CALL CTONW TS-27 (upload logs)
|
||||
-> CALL NWTOC TS-27 (download updates)
|
||||
-> CALL MENUX (main ATE menu)
|
||||
```
|
||||
|
||||
### Key Differences: Original vs New
|
||||
| Feature | Original (TS-27) | New Setup |
|
||||
|---------|------------------|-----------|
|
||||
| Machine ID | %1 parameter | %MACHINE% env var |
|
||||
| Orchestrator | ARCHBAT.BAT | ATESYNC.BAT |
|
||||
| Download source | T:\%1\ProdSW (per-machine) | T:\COMMON\ProdSW (centralized) |
|
||||
| Upload destination | T:\%1\LOGS (per-machine) | T:\%MACHINE%\LOGS (per-machine) |
|
||||
|
||||
---
|
||||
|
||||
**Session End:** 2026-01-21 16:00
|
||||
**Next Session:** Test ATESYNC and CTONW on DOS machine
|
||||
|
||||
Reference in New Issue
Block a user