ADD: implement migration scripts for PostgreSQL to Longhorn; update Immich configurations for namespace and persistent storage

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-25 18:51:42 +02:00
parent 1125b8b072
commit 9905abd9b4
19 changed files with 655 additions and 20 deletions
@@ -0,0 +1,38 @@
apiVersion: batch/v1
kind: Job
metadata:
name: immich-db-nfs-to-longhorn
namespace: immich
spec:
backoffLimit: 2
template:
spec:
restartPolicy: Never
containers:
- name: migrate-db
image: alpine:3.20
command:
- sh
- -c
- |
set -e
apk add --no-cache rsync
test -d /source/postgres
mkdir -p /target/postgres
rsync -aHAX --numeric-ids /source/postgres/ /target/postgres/
test -f /target/postgres/PG_VERSION
test -d /target/postgres/base
volumeMounts:
- name: source-nfs
mountPath: /source
readOnly: true
- name: target-longhorn
mountPath: /target
volumes:
- name: source-nfs
nfs:
server: 192.168.178.166
path: /export/fastData/immichDB
- name: target-longhorn
persistentVolumeClaim:
claimName: immich-db-pvc