From 4c4a383425b642125d5546f00cf34b7eac7c16ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Wed, 19 Mar 2025 01:25:32 +0100 Subject: [PATCH] add volume migration job util --- utils/migrate.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 utils/migrate.yaml diff --git a/utils/migrate.yaml b/utils/migrate.yaml new file mode 100644 index 0000000..1f4b081 --- /dev/null +++ b/utils/migrate.yaml @@ -0,0 +1,34 @@ +apiVersion: batch/v1 +kind: Job +metadata: + namespace: jellyfin # namespace where the PVC's exist + name: volume-migration +spec: + completions: 1 + parallelism: 1 + backoffLimit: 3 + template: + metadata: + name: volume-migration + labels: + name: volume-migration + spec: + restartPolicy: Never + containers: + - name: volume-migration + image: ubuntu:xenial + tty: true + command: [ "/bin/sh" ] + args: [ "-c", "cp -r -v /mnt/old /mnt/new" ] + volumeMounts: + - name: old-vol + mountPath: /mnt/old + - name: new-vol + mountPath: /mnt/new + volumes: + - name: old-vol + persistentVolumeClaim: + claimName: media-pvc + - name: new-vol + persistentVolumeClaim: + claimName: media-rwx-pvc # change to data target PVC