Discussion in 'Systems Administration' started by marek327, Jun 27, 2016.

  1. Hello.
    1. I have question,how can i "duplicate" files of minecraft server.
    I want 2 lobbies.

    2. How can i using SYMLINK , synchronise or what, these 2 lobbies, that what i do in lobby 1, this will aply lobby 2.
  2. I don't think I understand what you're asking but if you're trying to run two minecraft servers through symlink you might want to reconsider that and maybe just have a plugin prevent changes (if they don't change) and use a copy. I think if you were to say something like "Hey I'm using bungie cord and want to have two lobbies that look identical and have it as a backup incase the other goes down" people would be a lot more interested in helping since we don't know what you want. (I don't know much about bungiecord).
  3. You might be better off making or looking for a bungeecord plugin that sends any block change events from one server to the other. I doubt externally altering the server files while it is running will bring much good.
  4. But what plugin?

    Please answer to my first question, how to duplicate lobby 1 server into 2 servers.
  5. Click duplicate and run the server on a different port or ip
  6. ?.. I mean with console, with some SFTP , this will do one year.. omg
  7. If people don't understand what you are asking you asked it wrong. If you're asking how to duplicate a folder in linux then google "how to duplicate a folder in linux".
  8. JamesJ


    Same server
    Code (Text):

    mkdir /home/server2/
    cp -f /home/server1/* /home/server2
    Between servers
    Code (Text):

    Machine 1: mkdir /home/server2/
    Machine 2: scp /home/server1/* -r -P22* [email protected]:/home/server2
    *: Change the port to whatever your port is.
    If you use SSH keys, just add
    Code (Text):
    -i path/to/your.key
  9. Thanks for answer what i want, i have it on one server, so no need more machines :D This is not really cheap, so..
  10. JamesJ


    The first block of code will help you then.
  11. If you dont know how to use a linux machine / system you should not have a rootserver. Try to get experience with linux / rootservers in a virtual machine first...
  12. A symlink is an artifact of the file system of a Unix Like operating system (Linux, dozens more).

    In the shell, type: "man ln"

    There's two kinds of links. hard and soft. The soft link is the symlink.

    It is essentially a file with a path stored in the file. The type of the file known by the File System is a symbolic link. When the FS encounters this, it follows the link. Computer Science students in undergraduate programs usually have to write the FileSystem driver support for adding symlink as a demonstration (usually on something like Minix or other weaksauce Unix-like OS). See also: Andrew Tannenbaum.

    This has nothing to do with what you're really after.

    If you actually did symlink one directory to another and modified either one via two different threads asynchronously, you'll corrupt it.

    I think the solution is to do it in the application layer (others have mentioned bungee)

    Doing what you're asking at the Filesystem is not the right approach and will easily corrupt your data.
  13. Agreed.

    I tend to re-arrange the arguments a little so there's no confusion:

    Code (Text):

    scp -r -P22 SOURCEPATH [email protected]:DESTPATH
    scp won't copy special files. If you truly want to duplicate every file of every type, use cpio

    "man cpio"

    and for the esoteric, copying via tar:
    Code (Text):

    tar cf - SOURCEPATH | (ssh remotehost-l user ; tar xCf  DESTPATH -)