News:

SimuTranslator
Make Simutrans speak your language.

How do I implement automated backup and restart in Linux?

Started by moblet, December 28, 2014, 04:06:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

moblet

One for the Linux experts. I'm no Linux expert and am about to start hosting games on a Linux machine. I figure someone might have done this before and can show me how to do it.

DrSuperGood

This thread has some ideas how to get an automatic restarting process.

Start the server using a bash script which copies the server map before starting simutrans to another directory. You will want to give it a unique name (so backups are not deleted) however I am unsure how to do that simply. You might also want some script which runs every 3-6 hours or so which copies the map save to another "periodic" backup.

Michael 'Cruzer'

Simplest solution: Create cron-triggered bash script which copies the game to "/somedir/savegame_$date" and then create another script which deletes all files in "/somedir" which are older then x-days.
Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.