7D2D: Incomplete backup
Executing ./*server backup completes successfully, but does not capture any server or .local\user data ('save') files/folders. NOTE: The log does show the system recognizes there is a substantial amount of data
Jul 22 15:35:05.972 sdtdserver: STOP: PASS: Stopped My Game Host
Jul 22 15:35:05.976 sdtdserver: BACKUP: INFO: Lockfile generated
Jul 22 15:35:05.978 sdtdserver: BACKUP: INFO: /app/lgsm/lock/backup.lock
Jul 22 15:35:06.481 sdtdserver: BACKUP: INFO: A total of 15G will be compressed: /app/lgsm/backup/sdtdserver-2023-07-22-153452.tar.gz
Jul 22 15:35:06.985 sdtdserver: BACKUP: INFO: backup 15G sdtdserver-2023-07-22-153452.tar.gz, in progress
Jul 22 15:35:08.032 sdtdserver: BACKUP: PASS: Backup created: sdtdserver-2023-07-22-153452.tar.gz, total size 132K
Jul 22 15:35:08.828 sdtdserver: START: INFO: Using anonymous Steam login
Jul 22 15:35:09.565 sdtdserver: START: INFO: Rotating log files
Didn't matter if I used the 'basic' volume (cfg below) for '/data' or custom volume redirects (comment './test' & un-comment the rest). Both game me the same, small/incomplete backup
services:
linuxgsm-sdtd:
image: gameservermanagers/gameserver:sdtd
# image: ghcr.io/gameservermanagers/gameserver:sdtd
container_name: 7d2dserver
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./test:/data
# - ./svr:/data/serverfiles
# - ./userData:/data/.local/share/7DaysToDie
# - ./linuxgsm/log:/data/log
# - ./linuxgsm/cfg:/data/config-lgsm/sdtdserver
- ./linuxgsm/backup:/app/lgsm/backup
ports:
- 26910:26900/tcp # PC
- 26910-26915:26900-26905/udp # PC (added few 'extra' ports to CYA)
# [added more ports via https://7dtd.illy.bz/wiki/Ports]
- 8093:8083/tcp # OPTIONAL WEBADMIN [NOTE: match server's CFG file]
- 8094:8084/tcp # OPTIONAL TELNET [NOTE: match server's CFG file]
- 8095:8085/tcp # OPTIONAL WEBSERVER https://7dtd.illy.bz/wiki/Server%20fixes
- 8097:8087/tcp # OPTIONAL WEBSERVER https://github.com/dmustanger/7dtd-ServerTools
Comparing newer (left @ 133.6KB) vs. older (right @ 12GB) Docker image output :
The docker container doesn't work like native LinuxGSM.
The /app path is where LinuxGSM itself lives. It then just has a few symlinks into the game server directory under /data.
Therefore linuxgsm backup cannot do backups inside Docker, because it would just back up the links but not the data itself. This is totally normal. But perhaps should be better documented.
Furthermore, the LinuxGSM "backup" feature is not safe anyway, since it has no understanding of the games and may do those backups while the game server is still writing/hasn't written data to disk yet. Therefore it creates corrupt backups very commonly.
If you want to do backups, I recommend installing a tool appropriate for the game itself. For example, 7 Days to Die has a server mod called "ServerTools".
That mod has an option where you can configure automatic backups. It then automatically triggers a game world state save which flushes all the latest data to the hard disk, and then it does the backup zipping in a clean, safe way that won't corrupt any game world data blocks. Those backups also only take up a few hundred megabytes each, since it only saves the "game world status" files that actually matter.
TL;DR: Do not use LinuxGSM "backup" in Docker. Heck, don't use it outside docker either. It sucks. It's too basic and naive and often creates corrupt backups by trying to back up data that isn't fully written by the game yet.
Use the game's own modding/backup systems, if the game has them. Most games have such mods.
Nearly 2 yrs in the making, but appreciate ;) . There are options to include symbolic links+, but (IMO) the current code is jank at best.
Though I run ServerTools for my 7D2D dedi, I created my own scripts+ as a primary back-up. Helps that I can specify what I need for each dedi w/o having multi-GB back-ups when a few MB were required to fully restore [don't need the LGSM files, nor server/Steam files, etc.]
Game on!
TL;DR: Do not use LinuxGSM "backup" in Docker. Heck, don't use it outside docker either. It sucks. It's too basic and naive and often creates corrupt backups by trying to back up data that isn't fully written by the game yet.
Use the game's own modding/backup systems, if the game has them. Most games have such mods.
@irobot73 Nice. I checked your scripts and yeah that works.
Just beware that your 7 Days to Die world state/map save is slightly corrupt when doing it with that method. The game is crazily programmed and writes a lot of data to disk constantly. To get a clean backup with all partial data written to disk, it requires either a shutdown server, or a game mod (ServerTools) to flush data and pause the game during backup. 👯
@irobot73 Nice. I checked your scripts and yeah that works.
Just beware that your 7 Days to Die world state/map save is slightly corrupt when doing it with that method. The game is crazily programmed and writes a lot of data to disk constantly. To get a clean backup with all partial data written to disk, it requires either a shutdown server, or a game mod (ServerTools) to flush data and pause the game during backup. 👯
Yeah, you can see the size discrepancy. Mine is more of a 3rd copy that grabs 'my' files for the container
Always appreciate the feedback & eagle-eye/code-review :)