param( [string]$BackupSource = "/mnt/user/backups/borg", [string]$RestoreRoot = "/mnt/user/backups/restore-lab/gitea", [string]$ReportRoot = "/mnt/user/backups/restore-reports", [string]$BorgPassphraseFile = "/mnt/user/appdata/secrets/borg_repo_passphrase.txt", [switch]$WhatIf ) $Mode = if ($WhatIf) { "WhatIf" } else { "PlanOnly" } Write-Output "Gitea restore test scaffold" Write-Output "BackupSource: $BackupSource" Write-Output "RestoreRoot: $RestoreRoot" Write-Output "ReportRoot: $ReportRoot" Write-Output "BorgPassphraseFile: $BorgPassphraseFile" Write-Output "Expected Borg source path inside archive: local/gitea/data" if ($WhatIf) { Write-Output "Mode: WhatIf" } else { Write-Output "Mode: PlanOnly" } Write-Output "" Write-Output "Planned steps:" Write-Output "1. Prepare restore-lab target under /mnt/user/backups/restore-lab/gitea" Write-Output "2. Restore Gitea data into an isolated test path" Write-Output ' Template: borg extract "$BORG_REPO" "::ARCHIVE_NAME" local/gitea/data' Write-Output ' Passphrase source: $(cat /mnt/user/appdata/secrets/borg_repo_passphrase.txt)' Write-Output "3. Start container restoretest-gitea against test data only" Write-Output "4. Run smoke checks against the local web and SSH endpoints" Write-Output "5. Write markdown report under /mnt/user/backups/restore-reports" Write-Output "6. Stop test container and clean restore data after success" Write-Output "" Write-Output "This script is intentionally a scaffold only." Write-Output "No restore, no container start, no file write is executed yet."