User Tools

Site Tools


runbooks:backup:mautic

Mautic Backup CronJob

Meaning

These alerts monitor the Kubernetes Job created by the Mautic backup CronJob.

Alerts:

  • `MauticBackupSucceeded` → Backup Job succeeded; MariaDB database and Mautic application files were archived and uploaded to MinIO.
  • `MauticBackupFailed` → Backup Job failed; database dump or application files archive did not complete or failed to upload.

Impact

* Success → Backup completed successfully. Mautic data is safely stored in MinIO. * Failure → Mautic database or application files may not be backed up. Could affect disaster recovery if restoration is needed.

Diagnosis

1. Check Kubernetes Job status:

kubectl get job mautic-backup-job -n <NAMESPACE>
kubectl describe job mautic-backup-job -n <NAMESPACE>

2. Check logs of the Job pod:

kubectl logs job/mautic-backup-job -n <NAMESPACE>

3. Verify backup in MinIO:

mc ls <MINIO_ALIAS>/mautic-backups/
mc stat <MINIO_ALIAS>/mautic-backups/<backup_file>

4. Check PVC mounts if used:

kubectl get pvc -n <NAMESPACE>
kubectl describe pvc <PVC_NAME> -n <NAMESPACE>

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 * Database credentials invalid or inaccessible

Mitigation

1. Inspect Job pod logs to identify errors. 2. Verify MinIO credentials and connectivity. 3. Check PVC status and node disk availability. 4. Verify database credentials and connectivity. 5. Retry backup manually if needed:

kubectl create job --from=cronjob/mautic-backup-job mautic-backup-job-manual -n <NAMESPACE>

6. Correct any misconfigurations in CronJob YAML, database, or MinIO bucket policy. 7. 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 Mautic data may not be recoverable.

* MauticBackupSucceeded * MauticBackupFailed * HostOutOfDiskSpace (node running backup Job) * KubernetesPodCrashLooping

* Kubernetes → Jobs & CronJobs (namespace: <NAMESPACE>) * Grafana → Backup Job status metrics * MinIO → Backup object listings

runbooks/backup/mautic.txt · Last modified: by admin