Kaiede/Bedrockifier

Backup service fails to start successfully

Closed this issue · 1 comments

The backup service fails to start and backup the data.

The docker compose is:

version: '3.7'

services:

  backup:
    image: kaiede/minecraft-bedrock-backup
    container_name: bedrock-backup
    restart: unless-stopped
    depends_on:
      - "bd-public"
    environment:
        TZ: "Europe/Warsaw"
    stdin_open: true
    tty: true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/xyz/docker/bedrock-public/bd-backups:/backups
      - /home/xyz/docker/bedrock-public/bd-data:/bedrock_public


  bd-public:
    image: itzg/minecraft-bedrock-server
    restart: unless-stopped
    container_name: bedrock-public
    ports:
      - 19132:19132/udp
    tty: true
    stdin_open: true
    volumes:
      - /home/xyz/docker/bedrock-public/bd-data:/data

    environment:
      EULA: "true"
      
      SERVER_NAME: "Name"
      MOTD: "MOTD"
      
      DIFFICULTY: "normal"
      LEVEL_NAME: "BedrockPublic"
      ALLOW_CHEATS: "true"
      ALLOW_LIST: "true"
      ALLOW_LIST_USERS: "x,y"

The config.yml is:

containers:
  bedrock:
    - name: bedrock-public
      worlds:
        - /bedrock_public/worlds/BedrockPublic
schedule:
  interval: 2h
trim:
  # Keep all backups for the last two days (today and yesterday)
  # Keep at least one backup for the last 14 days
  # Keep at least two backups per world
  trimDays: 2
  keepDays: 14
  minKeep: 2

I get the following log from the backup container:

[18:35:12.037][info    ] Initializing Bedrockifier Daemon
[18:35:12.070][info    ] Configuring Bedrockifier Daemon
[18:35:12.086][info    ] Loading Configuration From: /backups/config.yml
[18:35:12.154][info    ] Configuration Loaded, Running Service...
[18:35:12.173][info    ] Host PTY Handle Opened: /dev/pts/1 (6)
[18:35:12.176][info    ] Child PTY Handle Opened: /dev/pts/1 (7)
[18:35:12.177][info    ] Checking for servers that might not be cleaned up
[18:35:12.179][info    ] Backup Interval: 7200.0 seconds
[18:35:12.179][info    ] Service Started Successfully.
[18:35:12.179][info    ] bedrock-public is dirty, cleaning up
[18:35:12.191][info    ] Resuming autosave on bedrock-public
[18:35:12.194][info    ] Starting Full Backup
[18:35:12.195][error   ] The operation could not be completed. (NSCocoaErrorDomain error 3587.)
[18:35:12.195][error   ] Container bedrock-public failed to backup properly
[18:35:12.195][info    ] Performing Trim Jobs
[18:35:12.211][info    ] Full Backup Completed
[18:35:12.212][error   ] The operation could not be completed. (PTYKit.PTYError error 4.)
[18:35:12.213][error   ] Full Backup Failed
[18:35:12.790][error   ] Docker was blocked from accessing docker.sock, make sure UID/GID are set correctly
[18:35:12.790][error   ] Failed to clean up container bedrock-public

Any ideas what could be wrong?

Hello,

I resolved the issue by delaying the start of the backup service the following way (changed the dependency):

depends_on:
      bd-public:
        condition: service_healthy

It works now. I close the issue.