arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
685 stars 144 forks source link

arkmanager backup fails to backup world when running in crontab #920

Closed matracey closed 6 years ago

matracey commented 6 years ago
Version Channel Blob SHA
1.6 None d8000171a7c920658fb83eea25317e9ac19cf15f

I'm running my ark server in a docker container using my own fork of TuRz4m/Ark-docker which pulls the latest version of art-server-tools from the repo. When I try to run the backup via crontab, the world file backup fails with the below error. Note: I can run backups normally using arkmanager backup and there's no issue. There just seems to be an issue with the getServerMapName function within the context of cron.

Running command 'backup' for instance 'main' Saved arks directory is /ark/server/ShooterGame/Saved/SavedArks Copying ARK world file () cp: cannot stat '/ark/server/ShooterGame/Saved/SavedArks/.ark': No such file or directory cp: cannot stat '/ark/server/ShooterGame/Saved/SavedArks/.ark': No such file or directory cp: cannot stat '/ark/server/ShooterGame/Saved/SavedArks/.tmp': No such file or directory FAILED Inconsistent casing in map name - .ark does not exist, but does Copying ARK profile files 01234567890123456.arkprofile 01234567890123457.arkprofile Copying ARK tribe files 1164886577.arktribe Copying ARK tribute tribe files Copying GameUserSettings.ini Copying Game.ini Compressing Backup Created Backup: main.2018-02-04_04.15.01.tar.bz2

klightspeed commented 6 years ago

That suggests that neither serverMap nor serverMapModId are set.

matracey commented 6 years ago

Yeah that was the issue. I can't seem to set them in the context of the cron for some reason, so I've had to settle for adding an inline export SERVERMAP in my crontab file.

*/15 * * * * export SERVERMAP="TheIsland"; arkmanager backup >> /ark/backups.log 2>&1