# TRAIL DPS - LOT 3 - Déploiement Workspace RESTORE

## Destination

`/home/synolui/programme/traildpsworkspace-restore`

RESTORE conserve sa propre configuration, sa propre base, ses propres secrets et son propre stockage. Ne jamais copier le `config/config.php`, les logs ou les fichiers privés de STAGING.

## Commande PowerShell exacte

```powershell
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
$ErrorActionPreference = "Stop"

$Zip = "C:\DEPLOIEMENT\TRAIL_DPS_WORKSPACE_RESTORE_1.1.0_LOT3_INCREMENTAL_2026-08-04.zip"
$Ssh = "UTILISATEUR@HOTE_OVH"
$Tools = Join-Path $env:TEMP ("TRAIL_DPS_LOT3_RESTORE_TOOLS_" + [guid]::NewGuid().ToString("N"))

New-Item -ItemType Directory -Path $Tools -Force | Out-Null
Expand-Archive -LiteralPath $Zip -DestinationPath $Tools -Force

& (Join-Path $Tools "traildpsworkspace-restore\scripts\Deploy-Lot3-Workspace-Restore.ps1") `
  -ZipPath $Zip `
  -SshTarget $Ssh `
  -ApplyMigration

if ($LASTEXITCODE -ne 0) { throw "Déploiement Workspace RESTORE LOT 3 en échec." }
```

## Contrôles exacts

```powershell
$Root = "/home/synolui/programme/traildpsworkspace-restore"
ssh.exe $Ssh "cd '$Root' && php tests/run.php"
ssh.exe $Ssh "cd '$Root' && php scripts/migrate.php"
ssh.exe $Ssh "cd '$Root' && php scripts/verify_installation.php"
ssh.exe $Ssh "cd '$Root' && php scripts/lot3_readiness.php"
curl.exe -4 -sS "https://traildpsworkspace-restore.synoluvia.fr/api/v1/health"
```

## Recette de restauration

Après une restauration coordonnée, vérifier :

- version et migration LOT 3 ;
- organisations, souscriptions, membres et invitations au point temporel restauré ;
- registre des courses consommées ;
- fichiers actifs et fichiers encore restaurables ;
- cohérence des UUID, révisions et snapshots ;
- absence de référence vers la configuration ou le stockage STAGING.
