Spaces:
Running on Zero
Running on Zero
File size: 609 Bytes
32c5da4 | 1 2 3 4 5 6 7 8 9 10 11 12 | 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"
|