Reorganize repo: compartmentalize scripts by client/project
Move 150+ scripts from root and scripts/ into client/project directories: - clients/dataforth/scripts/ (110 files: AD2, sync, SSH, DB, DOS scripts) - clients/bg-builders/scripts/ (14 files: Lesley mgmt, Exchange, termination) - clients/internal-infrastructure/scripts/ (10 files: GDAP, Gitea, backups) - projects/msp-tools/scripts/ (9 files: CIPP, MSP onboarding, Datto) - projects/gururmm-agent/scripts/ (3 files: API test, JWT, record counts) - clients/glaztech/scripts/ (1 file: CentraStage removal) Also reorganized: - VPN scripts → infrastructure/vpn-configs/ - Retrieved API/JS files → api/ - Forum posts → projects/community-forum/forum-posts/ - SSH docs → clients/internal-infrastructure/docs/ - NWTOC/CTONW docs → projects/wrightstown-smarthome/docs/ - ACG website files → projects/internal/acg-website-2025/ - Dataforth docs → clients/dataforth/docs/ - schema-retrieved.sql → docs/database/ Deleted 24 tmp_*.ps1 one-off debug scripts (preserved in git history). Root reduced from 220+ files to 62 items (docs + directories only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
34
clients/dataforth/scripts/check-wal-files.ps1
Normal file
34
clients/dataforth/scripts/check-wal-files.ps1
Normal file
@@ -0,0 +1,34 @@
|
||||
# Check for and clean up WAL files
|
||||
$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force
|
||||
$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password)
|
||||
|
||||
Write-Host "[OK] Mounting AD2 C$ share..." -ForegroundColor Green
|
||||
New-PSDrive -Name AD2 -PSProvider FileSystem -Root "\\192.168.0.6\C$" -Credential $cred -ErrorAction Stop | Out-Null
|
||||
|
||||
Write-Host "[OK] Checking for WAL/SHM files..." -ForegroundColor Green
|
||||
$dbFolder = "AD2:\Shares\testdatadb\database"
|
||||
|
||||
$walFile = Get-Item "$dbFolder\testdata.db-wal" -ErrorAction SilentlyContinue
|
||||
$shmFile = Get-Item "$dbFolder\testdata.db-shm" -ErrorAction SilentlyContinue
|
||||
|
||||
if ($walFile) {
|
||||
Write-Host "[FOUND] testdata.db-wal ($([math]::Round($walFile.Length/1KB,2)) KB)" -ForegroundColor Yellow
|
||||
Write-Host "[ACTION] Delete this file? (Y/N)" -ForegroundColor Yellow
|
||||
} else {
|
||||
Write-Host "[OK] No WAL file found" -ForegroundColor Green
|
||||
}
|
||||
|
||||
if ($shmFile) {
|
||||
Write-Host "[FOUND] testdata.db-shm ($([math]::Round($shmFile.Length/1KB,2)) KB)" -ForegroundColor Yellow
|
||||
} else {
|
||||
Write-Host "[OK] No SHM file found" -ForegroundColor Green
|
||||
}
|
||||
|
||||
# Check database file integrity
|
||||
Write-Host "`n[OK] Checking database file..." -ForegroundColor Green
|
||||
$dbFile = Get-Item "$dbFolder\testdata.db"
|
||||
Write-Host " Size: $([math]::Round($dbFile.Length/1MB,2)) MB" -ForegroundColor Cyan
|
||||
Write-Host " Modified: $($dbFile.LastWriteTime)" -ForegroundColor Cyan
|
||||
|
||||
Remove-PSDrive -Name AD2 -ErrorAction SilentlyContinue
|
||||
Write-Host "`n[OK] Done" -ForegroundColor Green
|
||||
Reference in New Issue
Block a user