mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
fix: update dump file handling in install.ps1 to use resolved path for PostgreSQL restoration
This commit is contained in:
parent
0cffa206ad
commit
1541cb3c7b
1 changed files with 2 additions and 1 deletions
|
|
@ -208,11 +208,12 @@ if ($MigrationMode) {
|
|||
if (-not (Test-Path $DumpFile)) {
|
||||
Write-Err "Dump file '$DumpFile' not found. The migration script may have failed."
|
||||
}
|
||||
$DumpFilePath = (Resolve-Path $DumpFile).Path
|
||||
Write-Info "Restoring dump into PostgreSQL 17 - this may take a while for large databases..."
|
||||
|
||||
$restoreErrFile = Join-Path $env:TEMP "surfsense_restore_err.log"
|
||||
Push-Location $InstallDir
|
||||
Invoke-NativeSafe { Get-Content $DumpFile | docker compose exec -T -e "PGPASSWORD=$DbPass" db psql -U $DbUser -d $DbName 2>$restoreErrFile | Out-Null } | Out-Null
|
||||
Invoke-NativeSafe { docker compose exec -T -e "PGPASSWORD=$DbPass" db psql -U $DbUser -d $DbName < $DumpFilePath 2>$restoreErrFile } | Out-Null
|
||||
Pop-Location
|
||||
|
||||
$fatalErrors = @()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue