thmhoag / arkserver

Docker image for a dedicated ARK Server with ArkManager.
MIT License
121 stars 43 forks source link

Daily restart with "saveworld" parameter deletes "TheIsland.ark" world save file #16

Closed GotSka81 closed 4 years ago

GotSka81 commented 4 years ago

Image Setup Details

Description of Issue

The default CRON job for restarting the server includes the parameter "--saveworld". Running the "saveworld" command while there are no players connected to the server results in the deletion of the current world save file. On the default map this file is called "TheIsland.ark", and is located at /var/lib/docker/volumes/VOLUMENAME/_data/server/ShooterGame/Saved/SavedArks/. This results in the creation of a new world save file then next time a player connects to the server, with all world structures, dinos, etc. missing.

Additional Information

The line in the crontab file that causes the issue:

15 10 * * * arkmanager restart --warn --saveworld

To resolve the issue, simply remove the "--saveworld" parameter:

15 10 * * * arkmanager restart --warn

Recommendation: Remove "--saveworld" parameter from all CRON jobs to remove risk of wiping world save due to lack of players.

thmhoag commented 4 years ago

Hey @GotSka81, this certainly seems like an odd one to me. That parameter is supposed to make sure the world is saved before performing the restart to ensure there isn't a rollback. Previously, without it, my servers would sometimes see a small "rollback" of 5-10 minutes depending on the time of the restart and the time of the last automatic world save by the server.

Looking at the code in ark-server-tools, it looks like that parameter actually ultimately results in running an rcon command of saveworld:

As far as I know, having players connected shouldn't impact the way the saveworld command works for the ARK server in general.

Would you be able to pull the container logs and the logs from the /ark/log directory after an occurrence of the issue so that we could take a closer look at the arkmanager logs when the restart command is issued? I'm wondering if something could be interfering with the i/o operation of writing the world save to the disk under these specific circumstances.

Also, as an additional note, if you want to disable this just for your servers you can mount a crontab file with whatever jobs you'd like. You could either docker cp a new one into the container while it's running and restart it, or you could mount it as a standalone file into the /ark/config folder.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.