[bukkit guide] Switching to snapshot server

Discussion in 'Bukkit Help' started by zipron, Jan 8, 2013.

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

    zipron

    Switching between bukkit & mojang's snapshot server

    Table of contents
    - what are the issues?
    - what is the solution?
    - for the windows users

    What are the issues?
    Because I wanted to test out the snapshot for 1.5, I decided to download the latest mojang server build and ran it with that one. I noticed one huge issue: the nether and the end were reset! After a few minutes, I discovered why: bukkit saves the nether and the end in seperate folders: world_nether/, world_the_end/. In those folders, you'll find the normal DIM-1/ folder for the nether, DIM1/ for the end. The mojang server loads the nether and the end from the default location: within the world/ folder. It meant that, each time I want to switch to the snapshot, I'd had to copy-paste my nether and end folder to the mojang server, and back if I wanted bukkit back. Not that convinient.

    Another issue are plugins, too bad, can't do anything about that one. I only use my own greylist plugin, when I use the mojang server, I just check good that the whitelist is correctly set up. So this is only an option for vanilla servers I suppose..

    What is the solution?
    coldandtired came up with a very simple solution for this issue: symbolic links. You'll just make a link between the bukkit folder, and say it ahs to use the mojang folder. This is how you do it:
    all these commands are performed from your server main dir. Also make sure your server is not running while doing this.

    creating a backup never hurts
    Code:
    mkdir backup
    cp world/ world_the_nether/ world_the_end/ backup
    
    remove the mojang's DIMs
    Code:
    rm -r world/DIM1 world/DIM-1
    
    copy the bukkit DIMs to the mojang folder
    Code:
    cp -R world_nether/DIM-1 world/
    cp -R world_the_end/DIM1 world/
    
    remove the bukkit DIMs
    Code:
    rm -r world_nether/DIM-1
    rm -r world_the_end/DIM1
    
    create for each DIM a link
    Code:
    ln -s world/DIM-1 world_nether/DIM-1
    ln -s world/DIM1 world_the_end/DIM1
    
    And that's all, now you created a link from the bukkit folder, to the mojang folder (which is the world/ folder, if you haven't noticed yet, bukkit uses this one too, but only for the overworld). Next time bukkit asks for the nether, it will go in the world_nether/ folder, and be redirected to the world/DIM-1 folder.

    For the windows users
    Spawnstah mentioned that this is also possible on Windows using the mklink command. I unfortunately am not able to test this out, but if some could, here is what he told me:
    Code:
    C:\Users\billgates>mklink
    Creates a symbolic link.
     
    MKLINK [[/D] | [/H] | [/J]] Link Target
     
            /D      Creates a directory symbolic link.  Default is a file
                    symbolic link.
            /H      Creates a hard link instead of a symbolic link.
            /J      Creates a Directory Junction.
            Link    specifies the new symbolic link name.
            Target  specifies the path (relative or absolute) that the new link
                    refers to.
    
    Zip
     
    iKeirNez and JWhy like this.
  2. Offline

    srn

    This will work on OS X and any other Unix server, too (*BSD etc).
     
  3. Offline

    zipron

    Oh yes, I'll change that, thanks =)
     
  4. Symlinks works in windows too, just use mklink.
     
  5. Offline

    zipron

    I don't know, never tried it on windows, the only thing I know on Windows are shortcuts, which don't work. Are you sure it works on all versions? home edition, professional,..

    zip
     
  6. Win2000 had junktions, win XP also + linked from the ResourceKit.
    Vista and forward have mklink (i think in all editions, I'm always using Pro or better so not used to Home Edition).

    Code:
    C:\Users\billgates>mklink
    Creates a symbolic link.
    
    MKLINK [[/D] | [/H] | [/J]] Link Target
    
            /D      Creates a directory symbolic link.  Default is a file
                    symbolic link.
            /H      Creates a hard link instead of a symbolic link.
            /J      Creates a Directory Junction.
            Link    specifies the new symbolic link name.
            Target  specifies the path (relative or absolute) that the new link
                    refers to.
    
    C:\Users\billgates>
    
    Sorry, didn't mean to highjack your thread. Just wanted to mention that this should be possible to do in Windows also for those who run that.
     
    zipron likes this.
  7. Offline

    zipron

    Oh sure, I love to learn new things, I'll mention it in the thread, however I won't be able to test how it works, but I'm sure google will find an answer if people want it to know =)
     
Thread Status:
Not open for further replies.

Share This Page