"Failed to save config" error in service logs despite backup working
- Dominant language
- Shell
- Stars
- 538
- Forks
- 69
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 2
Description
I'm getting multiple "failed to save config" errors in the logs for mc-backup. I suspect they're actually coming from rclone, but I'm unsure so I'm asking here first.
```
2022-05-01T23:02:58+0000 INFO waiting initial delay of 2m...
2022-05-01T23:04:58+0000 INFO waiting for rcon readiness...
2022-05-01T23:04:58+0000 INFO Command executed successfully rcon-cli save-on
2022-05-01T23:04:58+0000 INFO Command executed successfully rcon-cli save-off
2022-05-01T23:04:58+0000 INFO Command executed successfully rcon-cli save-all flush
2022-05-01T23:04:58+0000 INFO Command executed successfully sync
2022-05-01T23:04:58+0000 INFO Backing up content in /data to /backups/world-20220501-230458.tgz
2022/05/01 23:05:21 ERROR : Failed to save config after 10 tries: Failed to move previous config to backup location: rename /config/rclone/rclone.conf /config/rclone/rclone.conf.old: device or resource busy
2022-05-01T23:05:49+0000 INFO Command executed successfully rcon-cli save-on
2022/05/01 23:05:56 ERROR : Failed to save config after 10 tries: Failed to move previous config to backup location: rename /config/rclone/rclone.conf /config/rclone/rclone.conf.old: device or resource busy
2022-05-01T23:05:57+0000 INFO sleeping 24h...
```
This is how mc-backup is configured
```yaml
version: '3.7'
services:
flappack-backup:
image: docker.io/itzg/mc-backup:latest
environment:
- BACKUP_INTERVAL=24h
- RCON_HOST=flappack
- RCON_PASSWORD_FILE=/run/secrets/flappack-rcon-password
- BACKUP_METHOD=rclone
- RCLONE_REMOTE=Google Drive
- EXCLUDES=*.jar,cache,logs,mods,tmp,llibrary,libraries,*.so
volumes:
- flappack-data:/data:ro
secrets:
- source: google-drive-rclone-config
target: /config/rclone/rclone.conf
- source: flappack-rcon-password
volumes:
flappack-data:
external: true
secrets:
google-drive-rclone-config:
external: true
flappack-rcon-password:
external: true
```
It looks like rclone (?) is trying to move rclone.conf, but that's not working since it's mounted into the container by Docker. Any ideas on what to do? It's a not deal-breaker since the backups still work, but it would be nice to have less noise in my logs.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Docker Compose service definition and the mounted /config/rclone/rclone.conf secret, then trace how the rclone backup operation handles that config. Reproduce the backup with this configuration and verify that backups still complete without repeated “Failed to save config” errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100