[ADMIN/TOOL] Easy Server Backup Script using Cronjobs [1185+]

Discussion in 'Bukkit Tools' started by flaminSaganaki, Aug 20, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    For those of you in need of a simple and easy to configure backup solution for your minecraft server worlds... (with cronjob support)

    <font color="rgb(153, 51, 0)">Prequisites:</font>
    1. Linux and Windows is supported, though only the linux version has cronjob support.
    2. You do NOT need craftbukkit for this script to work.
    3. If running linux, you must have GNUscreen installed.

    GNUscreen can be easily installed by simply putting apt-get install screen in the console view of your server.
    For those of you who are unfamiliar with it, it is a very easy to use and simple utility, that simply allows you to have your server running in the background, almost like a daemon.
    To use screen, when logged in type screen -S minecraft to make a screen with the name "minecraft." Keep in mind that the script is looking for a screen by this name, and therefore any other names will not work.
    Once the screen has been created, you must then initiate or startup your minecraft server (in the screen). Once it has been started you can exit the screen window by pressing ctrl+a, and then d. While the server window may dissapear, remember it is continuously running in the background in the screen you created. To return to this screen you must type screen -r.
    Sorry if I did a poor job of explaining the screen stuff, but i assure you its very hastle free and easy.

    <font color="rgb(153, 51, 0)">Screen Commands:</font>
    For those of you who have not used screen before...
    * screen -S <name> Creates a screen by the name specified. For the script to work by default, it must be named "minecraft".

    * ctrl+a, d When in a screen, pressing this combo will return you to the normal console.

    * screen -r When outside of the screen, this command will return you to it.

    <font color="rgb(153, 51, 0)">Installation:</font>
    4. Place the minecraft_autobackup.sh or .bat file inside the root directory
    of your minecraft server. This is the same folder where you have
    the server.properties file and the minecraft jar file.
    5. Open the file with a linux text editor of your choice, ie vi, or notepad
    for Windows and configure the settings to your liking. There are a few
    options that you can toggle, such as the name of your world folder,
    logging, time between backups etc. Note: this isnt a required step as
    the plugin will work fine with default configuration.
    6. Navigate to the dir where you placed the .sh file, and type ./minecraft_autobackup.sh to manually run and install the crontab. Note: This step only needs to be done once.
    7. Simply start up your server in a screen that is named "minecraft".

    The script will run at any increment of time you wish, and will backup your world to a directory called "backups", which will be created right in the same folder you placed the minecraft_autobackup.sh file.

    That's all! Please comment to let me know if it worked for you and any suggestions you may have etc.
    Download Link Below!!!
    <Edit by Moderator: Redacted mediafire url>
    Last edited by a moderator: Nov 12, 2016
  2. Offline


    This is a great working backup utility for my server!! keep up the good work!
  3. Offline


    "keep up the good work!"

    Are you saying that to yourself? ._.
  4. Offline


    well yes. There have been no comments so i decided to encourage myself. Is that really soo evil of me?? lol
  5. Offline


    I get this error ...
    # sh minecraft_autobackup.sh
    : command not foundp.sh: line 3:
    : command not foundp.sh: line 6:
    : command not foundp.sh: line 7:
    : command not foundp.sh: line 10:
    : command not foundp.sh: line 13:
    : command not foundp.sh: line 16:
    : command not foundp.sh: line 19:
    : command not foundp.sh: line 22:
    : command not foundp.sh: line 25:
    : command not foundp.sh: line 28:
    : command not foundp.sh: line 31:
    : command not foundp.sh: line 34:
    : command not foundp.sh: line 37:
    : command not foundp.sh: line 40:
    : command not foundp.sh: line 43:
    minecraft_autobackup.sh: line 111: syntax error near unexpected token `done'
    'inecraft_autobackup.sh: line 111: `done < "$PROPFILE"
  6. Offline


    you dont run the file with the command sh. there is no sh command. To run it manually, first make sure you are in the directory with the file, and then type ./minecraft_autobackup.sh. When u run it, it will auto install a crontab to run automatically at an interval that you can set. Let me know if the prob has been solved
  7. Offline


  8. Offline


    Okay there you go. Apparently waiting 20 secs to download a file is too much for some people...
  9. Offline


    must manually run it the first time...
Thread Status:
Not open for further replies.

Share This Page