I am running Neo4j 3.5.1 using the Helm chart with a cluster of 3 nodes. I am trying to set up periodic backups on Kubernetes using a cron job.
<code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: backupdir-neo4j
labels:
app: neo4j-backup
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: neo4j-backup
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
volumes:
- name: backupdir-neo4j
persistentVolumeClaim:
claimName: backupdir-neo4j
containers:
- name: neo4j-backup
image: neo4j:3.5.1-enterprise
env:
- name: NEO4J_ACCEPT_LICENSE_AGREEMENT
value: "yes"
volumeMounts:
- name: backupdir-neo4j
mountPath: /tmp
command: ["bin/neo4j-admin", "backup", "--backup-dir", "/tmp", "--name", "backup", "--from", "neo-helm-neo4j-core-2.neo-helm-neo4j.default.svc.cluster.local:6362"]
restartPolicy: OnFailure
</code>
<code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: backupdir-neo4j
labels:
app: neo4j-backup
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: neo4j-backup
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
volumes:
- name: backupdir-neo4j
persistentVolumeClaim:
claimName: backupdir-neo4j
containers:
- name: neo4j-backup
image: neo4j:3.5.1-enterprise
env:
- name: NEO4J_ACCEPT_LICENSE_AGREEMENT
value: "yes"
volumeMounts:
- name: backupdir-neo4j
mountPath: /tmp
command: ["bin/neo4j-admin", "backup", "--backup-dir", "/tmp", "--name", "backup", "--from", "neo-helm-neo4j-core-2.neo-helm-neo4j.default.svc.cluster.local:6362"]
restartPolicy: OnFailure
</code>
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: backupdir-neo4j
labels:
app: neo4j-backup
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: neo4j-backup
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
volumes:
- name: backupdir-neo4j
persistentVolumeClaim:
claimName: backupdir-neo4j
containers:
- name: neo4j-backup
image: neo4j:3.5.1-enterprise
env:
- name: NEO4J_ACCEPT_LICENSE_AGREEMENT
value: "yes"
volumeMounts:
- name: backupdir-neo4j
mountPath: /tmp
command: ["bin/neo4j-admin", "backup", "--backup-dir", "/tmp", "--name", "backup", "--from", "neo-helm-neo4j-core-2.neo-helm-neo4j.default.svc.cluster.local:6362"]
restartPolicy: OnFailure
I have set up the cron job to run a backup every 5 minutes. However, I am encountering the following error:
<code>kubectl logs neo4j-backup-28759370-s8xwd
2024-09-05 18:50:27.408+0000 INFO [o.n.b.i.BackupOutputMonitor] Start receiving store files
command failed: Failed to run a backup using the available strategies.
</code>
<code>kubectl logs neo4j-backup-28759370-s8xwd
2024-09-05 18:50:27.408+0000 INFO [o.n.b.i.BackupOutputMonitor] Start receiving store files
command failed: Failed to run a backup using the available strategies.
</code>
kubectl logs neo4j-backup-28759370-s8xwd
2024-09-05 18:50:27.408+0000 INFO [o.n.b.i.BackupOutputMonitor] Start receiving store files
command failed: Failed to run a backup using the available strategies.