Save restart of a headless server?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
sirmg
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Mar 17, 2016 6:23 pm
Contact:

Save restart of a headless server?

Post by sirmg »

Hi,

my headless server is running on a vServer.
The server has his own user : facrorio.

How can i restart the server without losing any data? I once tryed simple #restart as root but there was a data loss in the savegame.
How can i close the server to prevent this?
sirmg
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Mar 17, 2016 6:23 pm
Contact:

Re: Save restart of a headless server?

Post by sirmg »

No one have an idea?

Right now the server does not save on the main savegame it uses only the autosave files.
When i now restart the server i must rename a autosave or change the the server start to an autosave file.

So is this a bug? Ore is your how to make make a server tut wrong?

Image
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Save restart of a headless server?

Post by daniel34 »

If you close the server with CTRL+C or by sending SIGINT to it, it will save the game to the savename it started from and then quit.
quick links: log file | graphical issues | wiki
sirmg
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Mar 17, 2016 6:23 pm
Contact:

Re: Save restart of a headless server?

Post by sirmg »

daniel34 wrote:If you close the server with CTRL+C or by sending SIGINT to it, it will save the game to the savename it started from and then quit.
CTRL+C will not work because its a process. How does SIGINT work? I never heard of it?!

Code: Select all

sudo -u factorio /usr/local/factorio/factorio/bin/x64/./factorio --start-server Neuland.zip
This is how i start the server.

Image

This is the process.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Save restart of a headless server?

Post by daniel34 »

Code: Select all

kill -INT $(pidof factorio)
will send the SIGINT signal to the process, making it save the game and then exit.

You can also use Bisa's [linux] Dedicated server init script
quick links: log file | graphical issues | wiki
Post Reply

Return to “Technical Help”