• 0

    posted a message on [Multi World] Minecraft Server Control Script

    Yes, create a cron job that calls the mscs script with the commands you need.

    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script

    I think all you need to do is go to the directory where you did the original git clone and update

    git pull
    sudo make update

    Or if you removed the directory, do another git clone in a temporary directory and update.

    git clone https://github.com/sandain/MinecraftServerControlScript.git
    sudo make update

    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script

    There were some updates recently to the script that should fix this.

    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script

    I would also check for a directory named `rdiff-backup-data` in your world folder.

    cd /opt/mscs/worlds/Trollworld
    ls -la

    If you see it there in the listing, remove it.

    rm -rf rdiff-backup-data

    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script

    That means there is something at the restore location, which makes sense since it's the world you are trying to restore. This looks like it might be a bug in the mscs script, this should probably go into the issue queue.


    I would rename that folder and try to restore again.

    cd /opt/mscs/worlds
    mv Trollworld Trollworld_old
    mscs restore-backup Trollworld 2015-07-25T06:50:51+02:00

    Then once things look ok, you can remove the renamed world

    rm -rf Trollworld_old

    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script

    I'm guessing that when you copied the backup folder, you didn't preserve permissions. The entire backup folder and it's contents need to be owned by the mscs minecraft user. The mscs settings need to point to the current backup folder location. Additionally, the backup folder names need to match the worlds they are backing up and should not be renamed.


    You can reset the owner of the backup folder with this command. Be sure to replace 'minecraft' with the correct username if you changed it in the mscs settings.

    chown -R minecraft:minecraft /opt/mscs/backups/

    If you ever move the folder again, either move it while you are 'sudo su' as the minecraft user, or be sure to preserve the permissions.

    cp -Rp /path/to/source/ /path/to/destination/

    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Added a new wiki page for examples on customizing server.properties
    https://github.com/sandain/MinecraftServerControlScript/wiki/Server.properties-Examples

    I will continue to add more examples as I need them myself. I will also accept examples posted here or in the GitHub issue queue.
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from sandain

    Hi minecraftblogde.

    I answered how to copy an existing world to the location the script uses in post #328 above.

    I added "Import Existing Worlds" to the GitHub wiki
    https://github.com/sandain/MinecraftServerControlScript/wiki#wiki-import-existing-worlds
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from swallowtail23

    Hey guys, I notice a few pages ago that there was discussion about the backup formats. I have been running a simple script previously (from the infancy days of this one) that was just running hourly tar.gz's that I would keep two days' worth of. I have just updated to the latest version of the script, with lots of awesome improvements - well done! :) But now my backups are a huge pile of files and increments that I am looking at thinking "how the heck would I recover to a point in time as simply as with the old way?"

    I have the disk space to burn for tars, wondering what the intent is with backups?

    Thanks for a great script. :)

    Backups use rdiff-backup which is incremental and only does a backup of what has changed instead of backing up everything every time. I contributed this patch a while ago and wrote some documentation on it.
    https://github.com/sandain/MinecraftServerControlScript/wiki/Backup-and-Restore

    I think there was a patch to restore the tgz backups but it's lost in the forums posts somewhere
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from sandain
    I was thinking it would be nice to have a proxy built into the script. Here is my work-in-progress script that only currently functions as a proxy between two ports. It does have a couple of simple parsers to output the traffic to the screen, but not much else yet. The ultimate goal would be to allow users to jump between servers with a command, but that is a long ways from be realized.
    Sounds cool, then you wouldn't have to use screen to interact with worlds...or am I reading this wrong?
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from sandain

    I was able to get my MC server back up and running, so I've been playing with the code.

    I've placed a new branch called 'world-admin' on github that has the create/delete and disable/enable options on the command line. The create world logic is also used to restore the ability of the script to function on its first run by creating a default world if no others are found. This branch might need some more work before I consider it done, and it definitely needs some more testing before I push it to master.

    I haven't gotten around to adding in a auto port or name generator, but that logic could easily be added in now.

    Cool, I will have to test. Hopefully I will have time, I really need to update my server.
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from sandain

    I guess we could come up with some logic that would find the highest used port number in a list of active worlds, then increment that by one if the port was not supplied on the command line. In the case of no active worlds, the default port would be used. We could create default world names by starting with 'world', then 'world1', 'world2', etc, but maybe it is best to require at least one argument to the create world command.

    My MC server died, hopefully the hdd is still ok. I'm not going to be able to test anything until I get one of my other boxes set up as a server, so I probably won't make any changes to the script until I can.

    I might be able to get around to working on it, I've been very busy the last month or so. Haven't had much time for extra projects. Things seem to be slowing down though.
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from sandain

    If you need me to review code, feel free to post it here. I check this thread periodically, but infrequently when there is no activity. I check more often when I notice the activity. Maybe I should set the forum to email me when there is a new post in this thread (if that is possible).

    Creating a world might be a little more involved than the command line might be able to handle. We need to know the world name, port, and IP address (usually blank) to populate an initial server.properties file. Although, a command like this might work:
    /etc/init.d/minecraft_server create <world> <port> <ip>

    This would have to create an error if either world or port is not specified (or uses default values that are already in use).

    I think we could scan the current active worlds .properties file for the next available port.
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from sandain

    Yeah, you were right. The command worked fine with sudo, but when run as a user it broke on the unescaped quotes. I usually do my testing with sudo from a different user and only occasionally test after running the command 'sudo su minecraft'.

    I agree, the script needs a way to create/delete and enable/disable worlds. In my mind the create and delete functions are pretty obvious, but I need to figure out how to ask the user questions from the shell script (ie. Are you really sure you want to delete your world? What would you like to name your new world?). The enable and disable functions would also require extra user input, but I need to think about how we want to do this. In my note above I mentioned moving disabled worlds to a worlds-disabled directory, which I could easily codify. The question is, do we want to rename the worlds directory to worlds-enabled to make it more obvious or leave it the way it is for backwards compatibility?

    edit: On second thought, maybe the script should just do what it is told on the command line and not worry about the consequences. If a web-facing app is ever linked to this script, it could take care of the 'Are you sure?' type of questions.

    Yeah, I don't think the command line need confirmations. Just do it.
    I would keep the active worlds in worlds/ and create the worlds-disabled/ directory. It should be pretty obvious what each are.
    I'm still working on a backup/restore interface. It's been kinda slow since I'm still learning how to use option.
    Posted in: Server Support and Administration
  • 0

    posted a message on [Multi World] Minecraft Server Control Script
    Quote from sandain

    Those are some weird errors; I'm not sure what is causing them.

    [email protected]:~$ /etc/init.d/minecraft_server start world
    Starting Minecraft Server:.

    This leads me to believe that your worlds.conf is malformed. Could you post a copy? Also, what happens if you omit the world name?
    [email protected]:~$ /etc/init.d/minecraft_server start


    I'm not sure what is causing this error:
    [email protected]:~$ /etc/init.d/minecraft_server status creative
    Minecraft Server Status:
    creative: Bareword found where operator expected at -e line 2, near "/etc/init"
    (Missing operator before nit?)
    syntax error at -e line 2, near "/etc/init"
    Execution of -e aborted due to compilation errors.

    I'm confused by the "/etc/init" bit, the script does not make any calls to itself and the only time the variable $0 is used is for printing error messages.

    If you figure out the cause, let me know and I can add code to make this kind of issue easier to diagnose in the future.


    edit: I was able to reproduce the problem and track it down. The fix has been posted.

    I knew it was the Perl command in the querySendPacket function, just had no idea how to fix it.

    Now that we have no worlds.conf file, we need a command to add / disable / remove worlds
    Posted in: Server Support and Administration
  • To post a comment, please or register a new account.