itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.19k stars 225 forks source link

Maintain directory structure on backup #457

Closed othorp closed 2 months ago

othorp commented 2 months ago

Fixes #413

Issue

Files moved/copied to backup folder had flattened directory structure. This caused filename clashes between [behavior_packs/vanilla, resource_packs/vanilla] and [behavior_packs/chemistry, resource_packs/chemistry]. This was causing upgrades to fail at the first attempt as described in #413. Because subsequent restart of container cleaned the partial backup with rm -rf "${bkupDir}" the filename clashes were resolved, but the backup was incomplete.

Change summary

This PR ensures the backup directory structure mirrors the original structure of the Bedrock Server data folder so should resolve these directory / filename clashes.