Author Topic: How do I implement automated backup and restart in Linux?  (Read 1314 times)

0 Members and 1 Guest are viewing this topic.

Offline moblet

How do I implement automated backup and restart in Linux?
« on: December 28, 2014, 04:06:20 AM »
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.

Offline DrSuperGood

Re: How do I implement automated backup and restart in Linux?
« Reply #1 on: December 28, 2014, 04:29:02 AM »
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.

Offline Michael 'Cruzer'

  • Devotee
  • *
  • Posts: 195
  • Total likes: 2
  • Helpful: 5
  • Founder of pak192.comic
    • Marktplatz für Parkplätze
  • Languages: DE, EN
Re: How do I implement automated backup and restart in Linux?
« Reply #2 on: December 29, 2014, 08:34:50 AM »
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.