Spaces:
Running on Zero
Running on Zero
| param( | |
| [string]$Target = "backups" | |
| ) | |
| $ErrorActionPreference = "Stop" | |
| New-Item -ItemType Directory -Force -Path $Target | Out-Null | |
| $stamp = Get-Date -Format "yyyyMMdd_HHmmss" | |
| $dest = Join-Path $Target "imageforge_backup_$stamp" | |
| New-Item -ItemType Directory -Force -Path $dest | Out-Null | |
| Copy-Item -Recurse -Force -Path "output" -Destination (Join-Path $dest "output") -ErrorAction SilentlyContinue | |
| Copy-Item -Force -Path "presets.json","prompt_history.json","settings.json","jobs_state.json","policy_audit.log","app.log" -Destination $dest -ErrorAction SilentlyContinue | |
| Write-Host "Backup created: $dest" | |