docker-minecraft-bedrock-server
docker-minecraft-bedrock-server copied to clipboard
Backup worlds dir on update
Why don't we back up the worlds directory on server version update?
My playgroup runs the latest version of Preview, it seems high risk that a new server version could corrupt the world.
I have rolling backups set up daily for the whole disk, but it would be nice to have the latest pre-upgrade version of the world in the backup folder.
That seems reasonable as an opt-in feature. I'd say it could do it always but people might have very large world data that would blow out volume space unexpectedly.
I'd be happy to implement this 😀
Are you thinking an environment variable for the opt in?
Should we compress the world folder to save space? Not sure if the files are already using compression or if that would be effective. Can test later
Cool. Yes an environment variable is what I'm thinking. Name I can think so far is UPGRADE_BACKUP_WORLD_DATA. As far as archive/compress, maybe that could be another variable like UPGRADE_BACKUP_ARCHIVE. Compression is probably effective, but large amounts of world data might take a little too long to compress.
Cool. Yes an environment variable is what I'm thinking. Name I can think so far is
UPGRADE_BACKUP_WORLD_DATA. As far as archive/compress, maybe that could be another variable likeUPGRADE_BACKUP_ARCHIVE. Compression is probably effective, but large amounts of world data might take a little too long to compress.
What about ON_UPGRADE_WORLD_BACKUP or BACKUP_WORLD_ON_UPGRADE this make then env var self-explanatory.
Haven’t forgotten about this but work and weekends are busy now. If someone wants to pick this up feel free. I’ll ping again when I can sit down and do it if still pending.
And I will also say I ran into a situation a couple weeks ago with a preview build that caused corruption with certain server.properties value. Luckily I had incremental backup set in Azure so I could restore, but it would have been nice to have the version from before upgrade in the folder :) we only lost ~6 hours of world data