Skip to content

fix: keep backups on the data volume (after LinuxGSM v26.5.0) - #117

Merged
dgibbs64 merged 1 commit into
mainfrom
fix/backup-on-volume-v26.5.0
Nov 4, 2026
Merged

dgibbs64 merged 1 commit into
mainfrom
fix/backup-on-volume-v26.5.0

Conversation

@dgibbs64

@dgibbs64 dgibbs64 commented Nov 1, 2026

Copy link
Copy Markdown
Member

Do not merge until LinuxGSM v26.5.0 is released. The image runs LinuxGSM from master. This change needs the backup exclusion fix in GameServerManagers/LinuxGSM#5129, which is in develop for v26.5.0. With an older LinuxGSM, a symlinked backup directory is not recognised and each backup would also archive all the earlier ones. That is why #115 was reverted in #116. This PR is a draft until then.

Description

LinuxGSM writes backups to /app/lgsm/backup. That is in the container's own layer, not on the /data volume, so every backup is lost when the container is recreated (for example on an image update).

This re-applies #115: it adds LGSM_BACKUPDIR (default /data/backup). entrypoint-user.sh creates it and links /app/lgsm/backup to it, the same way log, config-lgsm and data are already linked. entrypoint.sh prints and exports it with the other LGSM_* settings. An existing container that already has a real /app/lgsm/backup keeps it until the container is recreated.

With LinuxGSM v26.5.0, backup also includes game data kept under the home directory (/data in these images), such as Valheim worlds, Project Zomboid saves and Don't Starve Together clusters, which earlier versions left out.

Before merging

Testing

On a throwaway gameservermanagers/gameserver:vh container with the LinuxGSM #5129 modules copied in and /app/lgsm/backup linked to /data/backup as this change does:

  • backup with the server running: exit 0, PASS: Backup created, archive written to /data/backup on the volume.
  • The archive contained the Valheim world files and no earlier backups.
  • Two backups in a row: the second did not contain the first.

shellcheck -S warning is clean on both entrypoint scripts.

LinuxGSM writes backups to /app/lgsm/backup, which is in the container's own layer, so they were lost whenever the container was recreated. A new LGSM_BACKUPDIR (default /data/backup) is linked to /app/lgsm/backup, the same way the log, config and data directories are.

Re-applies #115, which was reverted in #116 because it needs the LinuxGSM v26.5.0 backup fix.
@dgibbs64
dgibbs64 marked this pull request as ready for review November 4, 2026 23:10
@dgibbs64
dgibbs64 merged commit 46b63cd into main Nov 4, 2026
29 checks passed
@dgibbs64
dgibbs64 deleted the fix/backup-on-volume-v26.5.0 branch November 4, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant