Skip to content

[Bug]: Docker Backups stores symlinks insead server files. Also backups folder is outside of persisted volume by default #4746

Open
@Neimolon

Description

@Neimolon

User story

As a user, I experienced error when I tried to use the backup tool. When I checked the backup tar file, it was suspiciously small. The content inside only keeps serverfile synlinks and none of the game data.

Game

PaperMC, but extensible to every docker

Linux distro

Ubuntu 22.04

Command

command: backup

Further information

As a user, I experienced error when I tried to use the backup tool. When I checker the backup tar file, it was suspiciously small. The content inside only keeps serverfile synlinks and none of the game data:

Tarball file content:

image

Original directory:

image

This behaviour can result on a catastrphic mess if you trust what this command is supposed to do.

There are many ways to get riddle of this. My quick fix was editing /app/lgsm/modules/command_backup.sh, and adding the "-h" param to tar, who make tar retieve the linked directories:

image

Additional Info:

/app/lgsm/ is not persisted into the docker volume folder so ....

  • this fix fill be lost in every deploy
  • /app/lgsm/backup is the default directory ... so neither will be persisted. It can and must be modified into configuration file to another location inside /data folder

Relevant log output

No response

Steps to reproduce

execute pmcserver backup inside a docker container and check the backup tar file... will find link to serverfile directory instead relevant data

you can add into your common.cfg something like ... backupdir="/data/backup"

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🆕 New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions