Replace the leftover 'subfeed' name across logger names + log_config, frontend localStorage keys, Postgres user/db/volume defaults in the compose files, .env.example, config.py, backup/restore scripts and the README. Pure rename; no behavioural change. localStorage keys move from subfeed.* to siftlode.* (one-time UI-state reset is acceptable).
9 lines
618 B
PowerShell
9 lines
618 B
PowerShell
# Restores a Siftlode Postgres dump created by backup.ps1 into the running db container.
|
|
# Usage: .\scripts\restore.ps1 backupssiftlode-YYYYMMDD-HHMMSS.dump
|
|
param([Parameter(Mandatory = $true)][string]$DumpFile)
|
|
$ErrorActionPreference = "Stop"
|
|
$user = if ($env:POSTGRES_USER) { $env:POSTGRES_USER } else { "siftlode" }
|
|
$dbname = if ($env:POSTGRES_DB) { $env:POSTGRES_DB } else { "siftlode" }
|
|
if (-not (Test-Path $DumpFile)) { throw "Dump file not found: $DumpFile" }
|
|
Get-Content -Encoding Byte $DumpFile | docker compose exec -T db pg_restore -U $user -d $dbname --clean --if-exists
|
|
Write-Output "Restored $DumpFile"
|