[GH-ISSUE #4387] [Bug]: (Some) command/scripts don't utilize proper path(s) [running both PZ & SDTD servers. Same on both] #2742

Closed
opened 2026-02-27 03:05:09 +03:00 by kerem · 6 comments
Owner

Originally created by @irobot73 on GitHub (Nov 23, 2023).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4387

User story

As a server admin I want the included scripts to utilize the proper paths to execute properly & successfully

Game

SDTDServer

Linux distro

Ubuntu 22.04

Command

command: update, command: backup

Further information

Part of #4384 ??

(Some) Scripts/commands, when executed via console, would successfully execute & complete (though incomplete [backup])

Appears they are pointing to the /app folder & ignoring the /data

In the cron jobs screenshot, you can see I manually exec. one of the same scripts & it was successful in the log (last entry) while the same script via cron failed (top of log file)

Cron jobs & manual execution attempts:
Cron jobs

Cron output:
crontab.log

Server setup:
Setup

Duped log files. Script creates new LOG paths, these exist under /DATA already (NOTE the symlink path):
Duped

Relevant log output

copying _default.cfg...OK
fetching GitHub common.cfg...OK
fetching GitHub secrets-common.cfg...OK
fetching GitHub pzserver.cfg...OK
fetching GitHub secrets-pzserver.cfg...OK

[ .... ] Updating pzserver: 
[ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Updating pzserver: 
[ .... ] Backing up pzserver: 
[ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory


[ .... ] Updating LinuxGSM pzserver: 
[ .... ] Updating pzserver: 
[ .... ] Updating LinuxGSM pzserver: Checking for log files
[ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory

[ INFO ] Updating LinuxGSM pzserver: Checking for log files: Creating log files
installing log dir: /app/log...OK
installing LinuxGSM log dir: /app/log/script...OK
creating LinuxGSM log: /app/log/script/pzserver-script.log...OK
installing console log dir: /app/log/console...OK
creating console log: /app/log/console/pzserver-console.log...OK
creating symlink to game log dir: /app/log/server -> /data/Zomboid/Logs...OK
creating symlink to steam log dir: /app/log/steam -> /data/.steam/steam/logs...OK

[ .... ] Updating LinuxGSM pzserver: Selecting repo
[  OK  ] Updating LinuxGSM pzserver: Selecting repo: GitHub
checking GitHub linuxgsm.sh...OK
checking pzserver...OK
checking GitHub config _default.cfg...OK
checking GitHub config ubuntu-22.04.csv...OK
checking GitHub module README.md...OK
...
checking GitHub module update_ts3.sh...OK
checking GitHub module update_ut99.sh...OK
checking GitHub module update_vints.sh...OK

[  OK  ] Updating LinuxGSM pzserver: Updating modules

[ .... ] Updating pzserver: 
[ .... ] Backing up pzserver: 
[ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory


[ .... ] Updating pzserver: 
[ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Updating pzserver: 
[ .... ] Updating LinuxGSM pzserver: 
[ .... ] Backing up pzserver: 
[ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Updating LinuxGSM pzserver: Selecting repo

[  OK  ] Updating LinuxGSM pzserver: Selecting repo: GitHub
checking GitHub linuxgsm.sh...OK
checking pzserver...OK
checking GitHub config _default.cfg...OK
checking GitHub config ubuntu-22.04.csv...OK
checking GitHub module README.md...OK
checking GitHub module alert.sh...OK
...
checking GitHub module update_ts3.sh...OK
checking GitHub module update_ut99.sh...OK
checking GitHub module update_vints.sh...OK

[  OK  ] Updating LinuxGSM pzserver: Updating modules
bash: pzserver: command not found

[ .... ] Updating pzserver: 
[ .... ] Updating pzserver: SteamCMD
[ .... ] Updating pzserver: Checking local build: SteamCMD
[  OK  ] Updating pzserver: Checking local build: SteamCMD
[ .... ] Updating pzserver: Checking remote build: SteamCMD
[  OK  ] Updating pzserver: Checking remote build: SteamCMD
[ .... ] Updating pzserver: Checking for update: SteamCMD
[  OK  ] Updating pzserver: Checking for update: SteamCMD

No update available
* Local build: 10105838
* Remote build: 10105838
* Branch: public
https://steamdb.info/app/380870/

Steps to reproduce

  1. Setup/install server
  2. Add cron job to LinuxGSM user
  3. Note failure
Originally created by @irobot73 on GitHub (Nov 23, 2023). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4387 ### User story As a server admin I want the included scripts to utilize the proper paths to execute properly & successfully ### Game SDTDServer ### Linux distro Ubuntu 22.04 ### Command command: update, command: backup ### Further information Part of #4384 ?? (Some) Scripts/commands, when executed via console, would successfully execute & complete (though incomplete [backup]) Appears they are pointing to the **/app** folder & ignoring the **/data** In the cron jobs screenshot, you can see I manually exec. one of the same scripts & it was successful in the log (last entry) while the same script via cron failed (top of log file) Cron jobs & manual execution attempts: ![Cron jobs](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/7c11e4e4-6e6e-42ab-b7ad-e1ef933cecd8) Cron output: [crontab.log](https://github.com/GameServerManagers/LinuxGSM/files/13451123/crontab.log) Server setup: ![Setup](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/5ecd6daa-6ff8-45c6-a37e-3b449c4fe80f) Duped log files. Script creates new LOG paths, these exist under /DATA already (**NOTE the symlink path**): ![Duped](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/04ba6a31-41b4-45b7-8299-e510d404a423) ### Relevant log output ```shell copying _default.cfg...OK fetching GitHub common.cfg...OK fetching GitHub secrets-common.cfg...OK fetching GitHub pzserver.cfg...OK fetching GitHub secrets-pzserver.cfg...OK [ .... ] Updating pzserver: [ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Updating pzserver: [ .... ] Backing up pzserver: [ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Updating LinuxGSM pzserver: [ .... ] Updating pzserver: [ .... ] Updating LinuxGSM pzserver: Checking for log files [ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory [ INFO ] Updating LinuxGSM pzserver: Checking for log files: Creating log files installing log dir: /app/log...OK installing LinuxGSM log dir: /app/log/script...OK creating LinuxGSM log: /app/log/script/pzserver-script.log...OK installing console log dir: /app/log/console...OK creating console log: /app/log/console/pzserver-console.log...OK creating symlink to game log dir: /app/log/server -> /data/Zomboid/Logs...OK creating symlink to steam log dir: /app/log/steam -> /data/.steam/steam/logs...OK [ .... ] Updating LinuxGSM pzserver: Selecting repo [ OK ] Updating LinuxGSM pzserver: Selecting repo: GitHub checking GitHub linuxgsm.sh...OK checking pzserver...OK checking GitHub config _default.cfg...OK checking GitHub config ubuntu-22.04.csv...OK checking GitHub module README.md...OK ... checking GitHub module update_ts3.sh...OK checking GitHub module update_ut99.sh...OK checking GitHub module update_vints.sh...OK [ OK ] Updating LinuxGSM pzserver: Updating modules [ .... ] Updating pzserver: [ .... ] Backing up pzserver: [ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Updating pzserver: [ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Updating pzserver: [ .... ] Updating LinuxGSM pzserver: [ .... ] Backing up pzserver: [ FAIL ] Updating pzserver: Cannot access /app/serverfiles: No such directory [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Updating LinuxGSM pzserver: Selecting repo [ OK ] Updating LinuxGSM pzserver: Selecting repo: GitHub checking GitHub linuxgsm.sh...OK checking pzserver...OK checking GitHub config _default.cfg...OK checking GitHub config ubuntu-22.04.csv...OK checking GitHub module README.md...OK checking GitHub module alert.sh...OK ... checking GitHub module update_ts3.sh...OK checking GitHub module update_ut99.sh...OK checking GitHub module update_vints.sh...OK [ OK ] Updating LinuxGSM pzserver: Updating modules bash: pzserver: command not found [ .... ] Updating pzserver: [ .... ] Updating pzserver: SteamCMD [ .... ] Updating pzserver: Checking local build: SteamCMD [ OK ] Updating pzserver: Checking local build: SteamCMD [ .... ] Updating pzserver: Checking remote build: SteamCMD [ OK ] Updating pzserver: Checking remote build: SteamCMD [ .... ] Updating pzserver: Checking for update: SteamCMD [ OK ] Updating pzserver: Checking for update: SteamCMD No update available * Local build: 10105838 * Remote build: 10105838 * Branch: public https://steamdb.info/app/380870/ ``` ### Steps to reproduce 1. Setup/install server 2. Add cron job to LinuxGSM user 3. Note failure
Author
Owner

@dgibbs64 commented on GitHub (Dec 4, 2023):

This is an issue with the docker container. Backup does need some changes made to work better with the container. however in general I recommend using 3rd party tools for regular backups like rsync as they are more efficient than the LinuxGSM just compress it solution 😄

<!-- gh-comment-id:1839113676 --> @dgibbs64 commented on GitHub (Dec 4, 2023): This is an issue with the docker container. Backup does need some changes made to work better with the container. however in general I recommend using 3rd party tools for regular backups like rsync as they are more efficient than the LinuxGSM just compress it solution 😄
Author
Owner

@irobot73 commented on GitHub (Dec 6, 2023):

This is an issue with the docker container. Backup does need some changes made to work better with the container. however in general I recommend using 3rd party tools for regular backups like rsync as they are more efficient than the LinuxGSM just compress it solution 😄

I understand the BACKUP script needs some tweaking, but the script execution (esp. via CRON) believes the SERVERFILES exist in the '/app' folder & NOT the '/data'.

Compose YML:
compose.txt

Server install & running:
Install

My CRON changes (using Portainer):
CRON

The CRON log:
crontab.log

/data/serverfiles (proper) vs. CRON /app/serverfiles :

[  OK  ] Updating LinuxGSM pzserver: Updating modules

[ .... ] Backing up pzserver: 
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Backing up pzserver: 
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Stopping pzserver: 
[ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory

[ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Backing up pzserver: 
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Backing up pzserver: 
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory
<!-- gh-comment-id:1843875491 --> @irobot73 commented on GitHub (Dec 6, 2023): > This is an issue with the docker container. Backup does need some changes made to work better with the container. however in general I recommend using 3rd party tools for regular backups like rsync as they are more efficient than the LinuxGSM just compress it solution 😄 I understand the BACKUP script needs some tweaking, but the script execution (esp. via CRON) believes the **SERVERFILES** exist in the '**/app**' folder & *NOT* the '**/data**'. Compose YML: [compose.txt](https://github.com/GameServerManagers/LinuxGSM/files/13592791/compose.txt) Server install & running: ![Install](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/a2cee90b-ad68-4a32-9579-cb81e80bbcd0) My CRON changes (using Portainer): ![CRON](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/4d1da4f3-2bdf-48a8-bd9e-87d2d0619c7b) The CRON log: [crontab.log](https://github.com/GameServerManagers/LinuxGSM/files/13592783/crontab.log) /data/serverfiles (proper) vs. CRON /app/serverfiles : ``` [ OK ] Updating LinuxGSM pzserver: Updating modules [ .... ] Backing up pzserver: [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Backing up pzserver: [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Stopping pzserver: [ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory [ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Backing up pzserver: [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Backing up pzserver: [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory ```
Author
Owner

@irobot73 commented on GitHub (Dec 8, 2023):

I created another instance & set the SERVERFILES ENV variable

services:
  lgsm-test:
    image: gameservermanagers/gameserver:pz # https://github.com/GameServerManagers/docker-gameserver
    container_name: lgsm-test
    environment:
      - LGSM_SERVERFILES=/data/serverfiles
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro

      - ./:/data
    ports:
      - 16264-16265:16261-16262/udp
      - 27017:27015
    restart: unless-stopped

Brought up the container & initial logs sees/creates

Screenshot from 2023-12-08 15-53-45

Setup the CRON w/ logging:

linuxgsm@a1d50ab924ee:/app$ whoami
linuxgsm
linuxgsm@a1d50ab924ee:/app$ crontab -l
# */60 * * * * /app/pzserver update > /dev/null 2>&1
*/15 * * * * /app/*server update-lgsm >> /data/log/crontab.log 2>&1 # EVERY SUN @ 1:30
*/10 * * * * /app/*server restart >> /data/log/crontab.log 2>&1     # EVERY Tu/Th/Sa @ 3:30
*/5 * * * * /app/*server backup >> /data/log/crontab.log 2>&1       # EVERY DAY @ 4:00
linuxgsm@a1d50ab924ee:/app$ 

& note the log. Scripts don't recognize variable:

[ .... ] Backing up pzserver: 
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Backing up pzserver: 
[ .... ] Stopping pzserver: 
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory
[ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory


[ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory

[ .... ] Backing up pzserver: 
[ .... ] Updating LinuxGSM pzserver: 
[ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory
[ .... ] Updating LinuxGSM pzserver: Checking for log files

[ INFO ] Updating LinuxGSM pzserver: Checking for log files: Creating log files
installing log dir: /app/log...OK
installing LinuxGSM log dir: /app/log/script...OK
creating LinuxGSM log: /app/log/script/pzserver-script.log...OK
installing console log dir: /app/log/console...OK
creating console log: /app/log/console/pzserver-console.log...OK
creating symlink to game log dir: /app/log/server -> /data/Zomboid/Logs...OK
creating symlink to steam log dir: /app/log/steam -> /data/.steam/steam/logs...OK

[ .... ] Updating LinuxGSM pzserver: Selecting repo
[  OK  ] Updating LinuxGSM pzserver: Selecting repo: GitHub

crontab.log

<!-- gh-comment-id:1847860326 --> @irobot73 commented on GitHub (Dec 8, 2023): I created another instance & set the SERVERFILES ENV variable ``` services: lgsm-test: image: gameservermanagers/gameserver:pz # https://github.com/GameServerManagers/docker-gameserver container_name: lgsm-test environment: - LGSM_SERVERFILES=/data/serverfiles volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - ./:/data ports: - 16264-16265:16261-16262/udp - 27017:27015 restart: unless-stopped ``` Brought up the container & initial logs sees/creates ![Screenshot from 2023-12-08 15-53-45](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/8a11c133-4ba1-4688-8773-09e4cc0a0b28) Setup the CRON w/ logging: ``` linuxgsm@a1d50ab924ee:/app$ whoami linuxgsm linuxgsm@a1d50ab924ee:/app$ crontab -l # */60 * * * * /app/pzserver update > /dev/null 2>&1 */15 * * * * /app/*server update-lgsm >> /data/log/crontab.log 2>&1 # EVERY SUN @ 1:30 */10 * * * * /app/*server restart >> /data/log/crontab.log 2>&1 # EVERY Tu/Th/Sa @ 3:30 */5 * * * * /app/*server backup >> /data/log/crontab.log 2>&1 # EVERY DAY @ 4:00 linuxgsm@a1d50ab924ee:/app$ ``` & note the log. Scripts don't recognize variable: ``` [ .... ] Backing up pzserver: [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Backing up pzserver: [ .... ] Stopping pzserver: [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory [ FAIL ] Stopping pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Backing up pzserver: [ .... ] Updating LinuxGSM pzserver: [ FAIL ] Backing up pzserver: Cannot access /app/serverfiles: No such directory [ .... ] Updating LinuxGSM pzserver: Checking for log files [ INFO ] Updating LinuxGSM pzserver: Checking for log files: Creating log files installing log dir: /app/log...OK installing LinuxGSM log dir: /app/log/script...OK creating LinuxGSM log: /app/log/script/pzserver-script.log...OK installing console log dir: /app/log/console...OK creating console log: /app/log/console/pzserver-console.log...OK creating symlink to game log dir: /app/log/server -> /data/Zomboid/Logs...OK creating symlink to steam log dir: /app/log/steam -> /data/.steam/steam/logs...OK [ .... ] Updating LinuxGSM pzserver: Selecting repo [ OK ] Updating LinuxGSM pzserver: Selecting repo: GitHub ``` [crontab.log](https://github.com/GameServerManagers/LinuxGSM/files/13621027/crontab.log)
Author
Owner

@irobot73 commented on GitHub (Dec 23, 2023):

I ended up rolling my own, for now. Again, I did redirect, via CONFIG-LGSM, the BACKUP location so it too existed in the /DATA folder.

## Backup Directory
backupdir="${HOME}/backup"

Could have changed the LSGM COMMAND_BACKUP script but every 'update-lgsm' would wipe it out & need to be redone. But you'd get the auto-rolling, purge & notifications (shrug)

tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}"...
to
tar -czf "${backupdir}/${backupname}.tar.gz" -C / -T /data/bkup_include.txt

Cut down the (expected via LGSM) 15GB backup, as it was grabbing /SERVERFILES+, to ~420MB by removing the 'bloat' (no TMP, LOGs & SteamCMD files+)

Create & add the file/folder(s) I needed to '/data/bkup_include.txt'.

  • Guess I don't REALLY need the /APP folder, but it's small enough
  • This is specific for my '7 Days to Die' server (I only need the 'SAVES' & config file(s)):
/app/lgsm/config-default/
/app/lgsm/config-lgsm/
/app/lgsm/data/
/app/lgsm/modules/

/app/entrypoint.sh
/app/entrypoint-healthcheck.sh
/app/entrypoint-user.sh
/app/linuxgsm.sh
/app/sdtdserver

/data/config-lgsm/
/data/serverfiles/sdtdserver.xml
/data/userData/

/data/bkup_exclude.txt
/data/bkup_include.txt

Reference the same file via new script that I could add to CRONTAB (chmod +x!!) [my_backup.sh]:

#!/bin/sh

FILENAME=lgsm_$(date -d "today" +"%A").tar.gz
BACKUP="/data/backup/${FILENAME}"

# echo ${BACKUP}

tar -czf "${BACKUP}" -C / -T /data/bkup_include.txt

exitcode=$?

echo "Completed: '${BACKUP}', Exit Code: ${exitcode}, Size $(du -sh "${BACKUP}" | awk '{print $1}')"

Crontab:

#*/60 * * * * /app/sdtdserver update > /dev/null 2>&1
#
30 0 * * 0 cat /dev/null > /data/log/crontab.log                 # EVERY SUN @ 00:30
0 1 * * 0 /app/*server update-lgsm >> /data/log/crontab.log 2>&1 # EVERY SUN @ 1:00
0 3 * * 1,3,5 /app/*server restart >> /data/log/crontab.log 2>&1  # EVERY M,W,F @ 3:00
0 4 * * * /data/my_backup.sh >> /data/log/crontab.log 2>&1  # EVERY DAY @ 4:00

7 day rolling backup w/ any other logic/work:

Crontab.log

/data/backup/lgsm_Friday.tar.gz
tar: Removing leading `/' from member names
tar: Removing leading `/' from hard link targets
Completed: '/data/backup/lgsm_Friday.tar.gz', Exit Code: 0, Size 401M

Screenshot from 2023-12-22 21-11-18
Screenshot from 2023-12-22 21-15-21

vs. Docker container where /DATA is mapped (IE: Only getting what I need)

    volumes:...
      - ./:/data
      - ./userData:/data/userData # Utilized in the game's SERVER.XML.CFG file

Screenshot from 2023-12-22 21-29-22

<!-- gh-comment-id:1868181048 --> @irobot73 commented on GitHub (Dec 23, 2023): I ended up rolling my own, for now. Again, I did redirect, via CONFIG-LGSM, the BACKUP location so it too existed in the /DATA folder. ``` ## Backup Directory backupdir="${HOME}/backup" ``` Could have changed the LSGM COMMAND_BACKUP script but every '**update-lgsm**' would wipe it out & need to be redone. But you'd get the auto-rolling, purge & notifications (*shrug*) `tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}"...` to `tar -czf "${backupdir}/${backupname}.tar.gz" -C / -T /data/bkup_include.txt` Cut down the (expected via LGSM) **15GB** backup, as it was grabbing /SERVERFILES+, to **~420MB** by removing the 'bloat' (no TMP, LOGs & SteamCMD files+) Create & add the file/folder(s) I needed to '**/data/bkup_include.txt**'. - Guess I don't REALLY need the /APP folder, but it's small enough - This is specific for my '7 Days to Die' server (I only need the 'SAVES' & config file(s)): ``` /app/lgsm/config-default/ /app/lgsm/config-lgsm/ /app/lgsm/data/ /app/lgsm/modules/ /app/entrypoint.sh /app/entrypoint-healthcheck.sh /app/entrypoint-user.sh /app/linuxgsm.sh /app/sdtdserver /data/config-lgsm/ /data/serverfiles/sdtdserver.xml /data/userData/ /data/bkup_exclude.txt /data/bkup_include.txt ``` Reference the same file via new script that I could add to CRONTAB (chmod +x!!) [**my_backup.sh**]: ``` #!/bin/sh FILENAME=lgsm_$(date -d "today" +"%A").tar.gz BACKUP="/data/backup/${FILENAME}" # echo ${BACKUP} tar -czf "${BACKUP}" -C / -T /data/bkup_include.txt exitcode=$? echo "Completed: '${BACKUP}', Exit Code: ${exitcode}, Size $(du -sh "${BACKUP}" | awk '{print $1}')" ``` Crontab: ``` #*/60 * * * * /app/sdtdserver update > /dev/null 2>&1 # 30 0 * * 0 cat /dev/null > /data/log/crontab.log # EVERY SUN @ 00:30 0 1 * * 0 /app/*server update-lgsm >> /data/log/crontab.log 2>&1 # EVERY SUN @ 1:00 0 3 * * 1,3,5 /app/*server restart >> /data/log/crontab.log 2>&1 # EVERY M,W,F @ 3:00 0 4 * * * /data/my_backup.sh >> /data/log/crontab.log 2>&1 # EVERY DAY @ 4:00 ``` 7 day rolling backup w/ any other logic/work: Crontab.log ``` /data/backup/lgsm_Friday.tar.gz tar: Removing leading `/' from member names tar: Removing leading `/' from hard link targets Completed: '/data/backup/lgsm_Friday.tar.gz', Exit Code: 0, Size 401M ``` ![Screenshot from 2023-12-22 21-11-18](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/72959a53-5682-46b2-8716-f388b2647b63) ![Screenshot from 2023-12-22 21-15-21](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/51a90812-50b8-413d-903e-62fdb8917ff3) vs. Docker container where /DATA is mapped (IE: Only getting what I need) ``` volumes:... - ./:/data - ./userData:/data/userData # Utilized in the game's SERVER.XML.CFG file ``` ![Screenshot from 2023-12-22 21-29-22](https://github.com/GameServerManagers/LinuxGSM/assets/7168597/1c0a52d7-2932-40df-95d8-f00a854d6981)
Author
Owner

@dgibbs64 commented on GitHub (Feb 28, 2024):

I have since added a symlink from /app/serverfiles to /data/serverfiles this should help resolve these issues. But I think more work may be required

<!-- gh-comment-id:1970048965 --> @dgibbs64 commented on GitHub (Feb 28, 2024): I have since added a symlink from `/app/serverfiles` to `/data/serverfiles` this should help resolve these issues. But I think more work may be required
Author
Owner

@github-actions[bot] commented on GitHub (Mar 3, 2025):

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:2692983230 --> @github-actions[bot] commented on GitHub (Mar 3, 2025): This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#2742
No description provided.