Skip to content

fixup fails if previous update failed #503

@jeremford

Description

@jeremford

It looks like the bedrock-entry.sh script fails to execute the fixup section if a previous update failed.


  | 2025-04-08T22:36:51.676Z | Downloading Bedrock server version 1.21.72.01 ...
  | 2025-04-08T22:36:52.278Z | Backing up resource_packs into backup-pre-1.21.72.01
  | 2025-04-08T22:36:52.281Z | mv: cannot stat 'resource_packs/chemistry': No such file or directory
  | 2025-04-08T22:36:52.281Z | mv: cannot stat 'resource_packs/vanilla': No such file or directory

Looks the following loop needs to check that the files/folders exist before trying to move them:

https://github.com/itzg/docker-minecraft-bedrock-server/blob/master/bedrock-entry.sh#L121C1-L134C7

  # fixup any previous interrupted upgrades
  rm -rf "${bkupDir}"
  for d in behavior_packs definitions minecraftpe resource_packs structures treatments world_templates; do
    if [[ -d $d && -n "$(ls $d)" ]]; then
      mkdir -p "${bkupDir}/$d"
      echo "Backing up $d into $bkupDir"
      if [[ "$d" == "resource_packs" ]]; then
        mv $d/{chemistry,vanilla} "${bkupDir}/$d/"
        cp -a $d/ "${bkupDir}/$d/"
      else
        mv $d "${bkupDir}/"
      fi
    fi
  done

I run the server on ECS with EFS, and I got around the issue by logging in and copying the resource_packs out of a previous backup folder and back to the root directory so that script worked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions