@@ -146,6 +146,18 @@ pub enum ReleaseCommandHandlerError {
146146 step : ReleaseStep ,
147147 } ,
148148
149+ /// Backup crontab installation failed
150+ #[ error( "Backup crontab installation failed: {message}" ) ]
151+ InstallBackupCrontabFailed {
152+ /// Description of the failure
153+ message : String ,
154+ /// The underlying error from the installation step
155+ #[ source]
156+ source : BoxedStepError ,
157+ /// The release step that failed
158+ step : ReleaseStep ,
159+ } ,
160+
149161 /// Backup storage directory creation failed
150162 #[ error( "Backup storage creation failed: {message}" ) ]
151163 CreateBackupStorageFailed {
@@ -262,6 +274,11 @@ impl Traceable for ReleaseCommandHandlerError {
262274 Self :: DeployBackupConfigFailed { message, .. } => {
263275 format ! ( "ReleaseCommandHandlerError: Backup configuration deployment failed - {message}" )
264276 }
277+ Self :: InstallBackupCrontabFailed { message, .. } => {
278+ format ! (
279+ "ReleaseCommandHandlerError: Backup crontab installation failed - {message}"
280+ )
281+ }
265282 Self :: CaddyConfigDeployment { message, .. } => {
266283 format ! (
267284 "ReleaseCommandHandlerError: Caddy configuration deployment failed - {message}"
@@ -311,6 +328,7 @@ impl Traceable for ReleaseCommandHandlerError {
311328 | Self :: RenderBackupTemplatesFailed { .. }
312329 | Self :: CreateBackupStorageFailed { .. }
313330 | Self :: DeployBackupConfigFailed { .. }
331+ | Self :: InstallBackupCrontabFailed { .. }
314332 | Self :: CaddyConfigDeployment { .. }
315333 | Self :: TrackerConfigDeployment { .. }
316334 | Self :: GrafanaProvisioningDeployment { .. }
@@ -335,6 +353,7 @@ impl Traceable for ReleaseCommandHandlerError {
335353 | Self :: RenderBackupTemplatesFailed { .. }
336354 | Self :: CreateBackupStorageFailed { .. }
337355 | Self :: DeployBackupConfigFailed { .. }
356+ | Self :: InstallBackupCrontabFailed { .. }
338357 | Self :: CaddyConfigDeployment { .. }
339358 | Self :: TrackerConfigDeployment { .. }
340359 | Self :: GrafanaProvisioningDeployment { .. }
@@ -622,6 +641,37 @@ For more information, see docs/user-guide/commands.md"
622641
6236424. Check file permissions on remote host
6246435. Review Ansible playbook execution logs above"
644+ }
645+ Self :: InstallBackupCrontabFailed { .. } => {
646+ "Backup Crontab Installation Failed - Troubleshooting:
647+
648+ 1. Verify SSH connection to remote host:
649+ ssh <user>@<host>
650+
651+ 2. Check Ansible playbook exists:
652+ ls templates/ansible/install-backup-crontab.yml
653+
654+ 3. Verify maintenance script is in build directory:
655+ ls build/<env-name>/backup/etc/maintenance-backup.sh
656+
657+ 4. Verify crontab entry is generated:
658+ ls build/<env-name>/backup/etc/maintenance-backup.cron
659+
660+ 5. Check that cron daemon is running on target:
661+ ssh <user>@<host> 'systemctl status cron'
662+
663+ 6. Check file permissions and ownership on target:
664+ ssh <user>@<host> 'ls -la /usr/local/bin/maintenance-backup.sh'
665+ ssh <user>@<host> 'ls -la /etc/cron.d/tracker-backup'
666+
667+ Common causes:
668+ - Cron daemon not installed or running
669+ - Permission denied on cron directory
670+ - Insufficient disk space on target
671+ - SSH authentication failure
672+ - Ansible playbook not found
673+
674+ For more information, see docs/user-guide/commands.md"
625675 }
626676 Self :: CaddyConfigDeployment { .. } => {
627677 "Caddy Configuration Deployment Failed - Troubleshooting:
0 commit comments