Make dev->prod deploy work for non-superuser role and fix image sync.
restore-db-data.js: fall back to multi-pass insert when the DB role cannot set session_replication_role, and parse multi-line INSERT values (bios) as whole statements. sync-images-to-prod.ps1: fix SMB root variable typo and fail fast with guidance when the share is not mapped. Document SMB mapping, non-superuser restore, and a troubleshooting table in the release runbook. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
ac1ae5794f
commit
313666a4ab
@@ -27,8 +27,15 @@ if (-not $SkipConfirm) {
|
||||
|
||||
$smbRoot = "\\192.168.10.122\Gallery"
|
||||
if ($env:SMB_USER -and $env:SMB_PASSWORD) {
|
||||
Write-Host "Mapping $sbmRoot ..."
|
||||
net use $sbmRoot /user:$env:SMB_USER $env:SMB_PASSWORD 2>&1 | Out-Host
|
||||
Write-Host "Mapping $smbRoot ..."
|
||||
net use $smbRoot /user:$env:SMB_USER $env:SMB_PASSWORD 2>&1 | Out-Host
|
||||
} elseif (-not (Test-Path $smbRoot)) {
|
||||
Write-Warning "Cannot access $smbRoot (not authenticated)."
|
||||
Write-Warning "Map the share first, e.g.:"
|
||||
Write-Warning (' net use ' + $smbRoot + ' /user:YOUR_TRUENAS_USER')
|
||||
Write-Warning 'or set $env:SMB_USER and $env:SMB_PASSWORD before running this script.'
|
||||
Write-Error 'SMB share not reachable - aborting before robocopy.'
|
||||
exit 1
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user