Giter Site home page Giter Site logo

gameserver-backup's Introduction

Gameserver backup

This script will backup the configured directories (in tar.gz format) and place them into another configured directory. There is options for how many backups to keep. You can specify several gameserver types as well which uses special scripting to make sure the gameserver gets backed up properly.

The backups.yml file

This file configures the backups. The format is below.

max_backups_to_keep: 3 # max number of each backup to keep

backups:
  - name: 'survival01' # name of the backup (will have date appended)
    directory: '/Users/steven/minecraft/survival01'
    output_directory: '/Users/steven/backup/minecraft'
    type: 'minecraft' # minecraft | other
    rcon: # rcon is used to run commands during the process. E.g. for minecraft it will turn off save and turn save back on after.
      host: '127.0.0.1'
      port: 25575
      password: 'minecraft'

Running the backup script.

The easiest way is to put the script in crontab and execute it as often as you'd like the backups to be created. E.g. for Ubuntu:

0 0,12 * * * cd ~/.minecraft-scripts && screen -dmS backup python3 backup.py

Which creates a Minecraft server backup every 12 hours.

gameserver-backup's People

Contributors

steveo5 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.