# GOAL Fleet Backup Script (Windows) # Run this in PowerShell to back up the GOAL folder to a USB drive # # USAGE: # .\backup_goal.ps1 # backs up to D:\GOAL-Backup\ # .\backup_goal.ps1 -Destination E:\ # backs up to E:\GOAL-Backup\ # # You only need to run this ONCE after everything is working. # It copies C:\GOAL\ (the algorithm, state, constitution, config) to a USB drive. # If a machine breaks, you copy the backup back and run the bootstrap command. param( [string]$Destination = "D:\GOAL-Backup" ) $source = "C:\GOAL" if (-not (Test-Path $source)) { Write-Host "ERROR: C:\GOAL\ not found. Install the algorithm first." -ForegroundColor Red Write-Host "Run: irm https://goalinvestment.biz/downloads/bootstrap.ps1 | iex" -ForegroundColor Yellow exit 1 } Write-Host "Backing up $source to $Destination..." -ForegroundColor Cyan if (Test-Path $Destination) { $stamp = Get-Date -Format "yyyyMMdd_HHmmss" $Destination = "$Destination-$stamp" Write-Host " Backup exists. Creating timestamped copy: $Destination" -ForegroundColor Yellow } Copy-Item -Path $source -Destination $Destination -Recurse -Force Write-Host "" Write-Host "BACKUP COMPLETE" -ForegroundColor Green Write-Host " Source: $source" -ForegroundColor White Write-Host " Backup: $Destination" -ForegroundColor White Write-Host "" Write-Host "To restore: Copy the backup folder back to C:\GOAL\ then run:" -ForegroundColor Yellow Write-Host " irm https://goalinvestment.biz/downloads/bootstrap.ps1 | iex" -ForegroundColor White Write-Host ""