Skip to content

Conversation

@kuleshov-aleksei
Copy link
Contributor

Resolves #252

Restic with an S3 repository can take up to 15 minutes while retrying to connect to an S3 bucket (for example, when AWS_DEFAULT_REGION set to invalid value). The log is completely empty while Restic is retrying, which makes it look as if the backup script is stuck.

The S3 availability check fails during the first request to S3, so I added some output redirection to the stdout of the backup script. Unfortunately, I didn't find a way to reuse existing log functionality, so I added a simple prefix restic cat config for clarity. It is completely optional, but without this prefix it's unclear what the errors means.

Example log output with this patch:

$ docker-compose up backups
[+] Running 1/1
 ✔ Container minecraft-server-vanilla-winter-2025-backups-1  Created                             0.0s
Attaching to backups-1
backups-1  | restic cat config: Stat(<config/>) returned error, retrying after 1.072411439s: Stat: 400 Bad Request
backups-1  | restic cat config: Stat(<config/>) returned error, retrying after 1.597222708s: Stat: 400 Bad Request
backups-1  | restic cat config: Stat(<config/>) returned error, retrying after 5.504658033s: Stat: 400 Bad Request
backups-1  | restic cat config: Stat(<config/>) returned error, retrying after 5.604453619s: Stat: 400 Bad Request
backups-1  | restic cat config: Stat(<config/>) returned error, retrying after 16.303520869s: Stat: 400 Bad Request
backups-1  | restic cat config: Stat(<config/>) returned error, retrying after 23.496983485s: Stat: 400 Bad Request
Gracefully stopping... (press Ctrl+C again to force)

Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this going

Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow up changes.

@itzg itzg merged commit 5489b90 into itzg:master Dec 16, 2025
1 check passed
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.

Add pre‑initialization log output for Restic to help debugging

2 participants