Skip to content

Cannot backup level.dat and playerdata #3525

@utsudashinou

Description

@utsudashinou

Describe the problem

I use tarball backup method. And backups are stored file server via NFS.

When I update latest images, suddenly, this message appeared.

backups-1  | tar: ./world/playerdata/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.dat: Cannot open: Permission denied
backups-1  | tar: ./world/level.dat: Cannot open: Permission denied
backups-1  | tar: ./world/level.dat_old: Cannot open: Permission denied

Permission of files of playerdata directory and level.dat are 600. I tried to chmod 622, but permission was overwritten, when started container and logined minecraft.

Container definition

services:
  mc:
    image: itzg/minecraft-server
    tty: true
    stdin_open: true
    restart: unless-stopped
    ports:
      - 25565:25565
    environment:
      EULA: "TRUE"
      VERSION: "1.21.6"
      ICON: /icon.png
      OVERRIDE_ICON: true
      #WORLD: /base
      MEMORY: 3G
      OPS: "UtsudaShinou"
      MAX_PLAYERS: 2
      MAX_TICK_TIME: "-1"
    volumes:
      - mc:/data
      - ./server-icon.png:/icon.png
      #- ./world:/base
  backups:
    image: itzg/mc-backup
    environment:
      BACKUP_INTERVAL: "24h"
      PRUNE_BACKUPS_DAYS: 3
      # instead of network_mode below, could declare RCON_HOST
      # RCON_HOST: mc
    volumes:
      # mount the same volume used by server, but read-only
      - mc:/data:ro
      # use a host attached directory so that it in turn can be backed up
      # to external/cloud storage
      - ./mc-backups:/backups
    # share network namespace with server to simplify rcon access
    network_mode: "service:mc"

volumes:
  mc:

Container logs

Edit: Moved to here

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionstatus/staleNo recently activity has been seen and will be closed soon.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions