====== n8n Backup CronJob ======
===== Meaning =====
These alerts monitor the Kubernetes Job created by the n8n backup CronJob.
Alerts:
* `N8nBackupSucceeded` → Backup Job succeeded; n8n PVC data was archived and uploaded to MinIO.
* `N8nBackupFailed` → Backup Job failed; PVC data backup did not complete or failed to upload.
===== Impact =====
* Success → Backup completed successfully. n8n workflow data is safely stored in MinIO.
* Failure → n8n workflow data may not be backed up. Could affect disaster recovery if restoration is needed.
===== Diagnosis =====
1. Check Kubernetes Job status:
kubectl get job n8n-backup-job -n
kubectl describe job n8n-backup-job -n
2. Check logs of the Job pod:
kubectl logs job/n8n-backup-job -n
3. Verify backup in MinIO:
mc ls /n8n-backups/
mc stat /n8n-backups/
4. Check PVC mounts:
kubectl get pvc -n
kubectl describe pvc -n
===== Possible Causes of Failure =====
* Pod in CrashLoopBackOff, OOMKilled, or Failed
* PVC mount unavailable or insufficient space
* MinIO credentials missing or misconfigured
* Network issues preventing upload to MinIO
* Disk space or permissions issues on the node
* CronJob manifest misconfiguration
===== Mitigation =====
1. Inspect Job pod logs to identify errors.
2. Verify MinIO credentials and connectivity.
3. Check PVC status and node disk availability.
4. Retry backup manually if needed:
kubectl create job --from=cronjob/n8n-backup-job n8n-backup-job-manual -n
5. Correct any misconfigurations in CronJob YAML, PVC, or MinIO bucket policy.
6. Escalate to SRE or admin team if repeated failures occur.
===== Escalation =====
* Escalate if backups fail for more than one consecutive run.
* Notify on-call engineer if n8n workflow data may not be recoverable.
===== Related Alerts =====
* N8nBackupSucceeded
* N8nBackupFailed
* HostOutOfDiskSpace (node running backup Job)
* KubernetesPodCrashLooping
===== Related Dashboards =====
* Kubernetes → Jobs & CronJobs (namespace: )
* Grafana → Backup Job status metrics
* MinIO → Backup object listings