Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron: Return a non-zero exit code when errors are encountered during backup #403

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

dotboris
Copy link
Contributor

Fixes: #400

This PR makes it so that autorestic cron crashes (returns a non-zero exit code) when there's an error during one of the backups. All errors are collected and printed out at the end of the run.

Note that this new behavior does not stop autorestic cron from running all backups. It will attempt to backup all locations that are scheduled and collect errors. It will only crash at the end of this process.

Copy link

vercel bot commented Oct 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
autorestic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 0:14am

@cupcakearmy
Copy link
Owner

Thanks so much for this!

@cupcakearmy cupcakearmy merged commit 41e4e4a into cupcakearmy:master Oct 17, 2024
4 checks passed
@dotboris dotboris deleted the crash-on-cron-backup-error branch October 17, 2024 15:59
@kumy
Copy link

kumy commented Oct 17, 2024

Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exit code in cron mode
3 participants