apiVersion: batch/v1
kind: Job
metadata:
  name: sonarr-appdata-migration
spec:
  template:
    spec:
      nodeName: pkn002l
      containers:
      - image: eeacms/rsync
        command: ["rsync","-ravx","--progress","/old/","/new/"]
        imagePullPolicy: IfNotPresent
        volumeMounts:
          - mountPath: /new
            name: appdata
            subPath: sonarr
          - mountPath: /old
            name: unraid
        name: rsync
      volumes:
      - name: appdata
        persistentVolumeClaim:
          claimName: appdata-pvc
      - name: unraid
        nfs:
          path: /mnt/user/appdata/sonarr
          server: 10.10.0.101
      restartPolicy: Never
  backoffLimit: 4
