Repository navigation
fix: keep backups on the data volume (after LinuxGSM v26.5.0) - #117
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
LinuxGSM writes backups to
/app/lgsm/backup. That is in the container's own layer, not on the/datavolume, 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.shcreates it and links/app/lgsm/backupto it, the same waylog,config-lgsmanddataare already linked.entrypoint.shprints and exports it with the otherLGSM_*settings. An existing container that already has a real/app/lgsm/backupkeeps it until the container is recreated.With LinuxGSM v26.5.0,
backupalso includes game data kept under the home directory (/datain these images), such as Valheim worlds, Project Zomboid saves and Don't Starve Together clusters, which earlier versions left out.Before merging
master).Testing
On a throwaway
gameservermanagers/gameserver:vhcontainer with the LinuxGSM #5129 modules copied in and/app/lgsm/backuplinked to/data/backupas this change does:backupwith the server running: exit 0,PASS: Backup created, archive written to/data/backupon the volume.shellcheck -S warningis clean on both entrypoint scripts.