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

Improve resilience of systemd-backup task #117

Closed
strowi opened this issue Jun 12, 2023 · 2 comments
Closed

Improve resilience of systemd-backup task #117

strowi opened this issue Jun 12, 2023 · 2 comments

Comments

@strowi
Copy link

strowi commented Jun 12, 2023

Hi,

thx for this neat project, i've been using restic on our k8s-servers for a while already, but with this i've now come around again to try it on the linux-desktops.;)

I've noticed a small problem with the restic-backup@default.service - when resuming from suspend or similar that service (at least sometimes) is too fast and fails because the network is not up yet. Even adding sth. like

After=network.target network-online.target
Wants=network-online.target

didn't work. Still throwing

Jun 11 09:28:19 sleipnir systemd[1]: Started Backup with restic to Backblaze B2.
Jun 11 09:28:35 sleipnir cat[276324]: Fatal: unable to open config file: Stat: Head "https://s3.xyz/a/b/c": dial tcp: lookup s3.xyz on 127.0.1.1:53: server misbehaving

Yes, this is S3, but that shouldn't matter to the DNS-resolution not working. After adding a small while !ping google.de; do sleep... to the service the error is gone.

@erikw
Copy link
Owner

erikw commented Jun 12, 2023

I'm afraid I can't help you to debug this further. But please share here if you find something out.

You don't seem to be alone with issues using After=network.target..., and the suggestion solution could be to create a system "ping target", see:

https://unix.stackexchange.com/a/538901

@strowi
Copy link
Author

strowi commented Jun 13, 2023

I couldn't find any related issue, so i just wanted to leave that here.

It seems to be a mix between network (which is up in my case) and the local DNS resolver (systemd-resolved) being able to resolve queries.
I'll try adding that as a dependency, but don't think that will work either (systemd-resolved is a bit of a pita). So i will keep the until ping.. solution.

Thx!

@strowi strowi closed this as completed Jun 13, 2023
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

No branches or pull requests

2 participants