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

Update example docker compose so services restart on crash #141

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

tobiasmuehl
Copy link
Contributor

@tobiasmuehl tobiasmuehl commented Jul 28, 2022

Restic backup can fail for a number of reasons. If the process crashes once, it should be restarted, so once the underlying failure is resolved (B2 API downtime, internet connectivity issues, etc) backups will resume automatically.

@djmaze
Copy link
Owner

djmaze commented Aug 30, 2022

As far as I can see, the container should never crash because everything is wrapped in a cron scheduler process. Does the container crash for you?

@tobiasmuehl
Copy link
Contributor Author

This happened a long time ago. I don't recall if the container crashed fully, but I assume so. The failure had to do with a server error at B2

@djmaze
Copy link
Owner

djmaze commented Aug 31, 2022

Would be good if anyone can confirm that the container can crash. (And I would really like to know how that can happen.)

As I don't think the container will crash, the restart option won't help with your problem either way.

@iwa
Copy link

iwa commented Feb 15, 2023

either can the container crash or not is not the question here imo, having a restart policy is a really good docker practice, and can be useful in other cases like a restart or else, not only to prevent crashes (and even if they are rare, they can still happen)
but the unless-stopped policy should be a better choice, always would trap people into having restic always on 24/7, and their only way to shutdown it would be to delete the container, so it's not ideal

@djmaze
Copy link
Owner

djmaze commented Feb 20, 2023

Okay, let's do that. I also trapped on restart: always quite a few times, so @tobiasmuehl please change it to unless-stopped.

@djmaze djmaze added this to the 1.7.0 milestone Feb 20, 2023
@tobiasmuehl
Copy link
Contributor Author

done

@djmaze djmaze merged commit 340694d into djmaze:master Feb 26, 2023
@tobiasmuehl tobiasmuehl deleted the patch-1 branch February 27, 2023 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants