====== Ghost Backup CronJob ======
===== Meaning =====
These alerts monitor the Kubernetes Job created by the Ghost backup CronJob.
Alerts:
* `GhostBackupSucceeded` → Backup Job succeeded; MySQL database and Ghost content folders were archived and uploaded to MinIO.
* `GhostBackupFailed` → Backup Job failed; database dump or content archive was not completed or failed to upload.
===== Impact =====
* Success → Backup completed successfully. Data is safely stored in MinIO.
* Failure → Ghost website or database backup may be missing. Could affect disaster recovery if restoration is needed.
===== Diagnosis =====
1. Check Kubernetes Job status:
kubectl get job ghost-backup-job -n
kubectl describe job ghost-backup-job -n
2. Check logs of the Job pod:
kubectl logs job/ghost-backup-job -n
3. Verify backup in MinIO:
mc ls /ghost-backups/
mc stat /ghost-backups/
4. Check PVC mounts if used:
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/ghost-backup-job ghost-backup-job-manual -n
5. Correct any misconfigurations in CronJob YAML 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 production Ghost data may not be recoverable.
===== Related Alerts =====
* GhostBackupSucceeded
* GhostBackupFailed
* HostOutOfDiskSpace (node running backup Job)
* KubernetesPodCrashLooping
===== Related Dashboards =====
* Kubernetes → Jobs & CronJobs (namespace: )
* Grafana → Backup Job status metrics
* MinIO → Backup object listings