Forum

Page 1 of 4 123 ... LastLast
Results 1 to 15 of 50
  1. #1
    Join Date
    July 2002
    Location
    Germany
    Posts
    2,192

    Snapshot helper scripts

    Hello there,

    What are snapshots?

    They are a way to create an "image" of some virtualservers settings.
    They contain all the permissions, users, channels and server settings. The only thing they
    do not contain is the files upload to the server (since that could be too much data ).

    They are useful as a backup, or when you want to migrate your nicely configured server
    to some new location. Also they can be used to provide an "example setup" that can be
    imported anywhere and then changed from there.

    What can I find here?

    The serverquery has two commands, serversnapshotcreate and serversnapshotdeploy that can be used to obtain and to deploy a snapshot. The "problem" is you need to copy&paste the (usually pretty long) output of serversnapshotcreate and paste that as parameter to serversnapshotdeploy.

    To make this process easier, I wrote two (bash) scripts. The pullsnapshot.sh script will retrieve a snapshot from the server that you specify, for example like this:
    Code:
    ./pullsnapshot.sh serveradmin 123213123ggadsa213 voice.teamspeak-systems.de 10011 public_server_snapshot.txt 1
    The first three parameters (username, password and host) are required, the last three are optional, the usage is:
    Code:
    Usage: ./pullsnapshot.sh username password host [query_port=10011] [output_file=snapshot.txt] [virtual server ID=1]
    The putsnapshot.sh is very similar, the usage is the same, except that the file is now the input_file.

    Hopefully somebody finds this useful
    Attached Files Attached Files
    Last edited by dante696; March 30th, 2016 at 09:40 AM.

  2. #2
    Join Date
    May 2006
    Location
    California
    Posts
    27
    Have these been updated for use with RC1?

  3. #3
    Join Date
    June 2008
    Posts
    18,104
    They work with beta1 up to rc1 server yes. There was only a typo in on of these files.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  4. #4
    Join Date
    June 2011
    Posts
    1
    Hello Peter,

    I have 2 ts3 servers running on 2 virtual private servers.

    On the server A I have a lot of channels and settings and i want to copy this to the server B on a different VPS.

    How can I copy all the settings from server a to server b?

    I don't know how to use your script.

    Can you do a step by step for me?

    Regards.

    s4v4n4

  5. #5
    Join Date
    June 2008
    Posts
    18,104
    An example is given above :-/

    Use the console on linux to start that script with parameters or use cygwin on a windows based machine.

    Start the pullsnapshot.sh with your paramters > now you ve got a txt file
    Start the pullsnapshot.sh with new parameters (new address or virtual server as an example) > snapshot got applied on your second server.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  6. #6
    Join Date
    November 2010
    Location
    Germany
    Posts
    42
    Script doesn't work for me.

    Server version is rc1

    console always says: target file already exists

    but of course there is not a .txt file in the directory.
    there is just an file with the VServer ID i've given as parameter in the dirctory, but this file doesn't have an extension.
    so in my case (I want to save sid= 8) the file's name is just "8".

    are you sure the script is 100% working?
    or do you have an idea how I can fix my problem?
    t i a

  7. #7
    Join Date
    June 2008
    Posts
    18,104
    Yes we are sure, that it works.
    Please show us your command, you use for that.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  8. #8
    Join Date
    November 2010
    Location
    Germany
    Posts
    42
    ok, I've made a screenshot of the console:


    and the second time I try the command, it says "file already exists"
    but I found the file in the directory, but it was just an empty .txt file

    btw: I use cygwin
    Last edited by rindorbrot; May 26th, 2012 at 12:52 PM.

  9. #9
    Join Date
    July 2002
    Location
    Germany
    Posts
    2,192
    Hey,

    the output "nc: command not found" means you are missing the utility "netcat", which provides a binary called "nc"; which is used by the script. In short: install netcat.
    You think my answer is stupid ? Read This:
    http://www.catb.org/~esr/faqs/smart-...ons.html#intro

    In a world without fences and walls - who needs windows and gates ?

  10. #10
    Join Date
    November 2010
    Location
    Germany
    Posts
    42
    Thank you very much Peter!
    now it worked. nice script

  11. #11
    Join Date
    January 2010
    Location
    Germany
    Posts
    2,029
    Code:
    [email protected]:~$ ./pullsnapshot.sh serveradmin locDemoPw 127.0.0.1
    Invalid number of lines from snapshot retrieval, aborting
    View snapshot.txt for details
    [email protected]:~$ cat snapshot.txt
    TS3
    Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
    [email protected]:~$
    Thats all that happens for me. Can't seem to get a snapshot even though if I do it myself it works just fine.

    Code:
    [email protected]:~$ telnet 127.0.0.1 10011
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.
    TS3
    Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
    login serveradmin locDemoPw
    error id=0 msg=ok
    use 1
    error id=0 msg=ok
    serversnapshotcreate
    permid=i_channel_needed_delete_power permvalue=75 permskip=0 permnegated=0|permid=i_client_needed_talk_power permvalue=10 permskip=0 permnegated=0|permid=i_ft_needed_file_download_power permvalue=70 permskip=0 permnegated=0|permid=i_ft_needed_file_browse_power permvalue=70 permskip=0 permnegated=0|end_flat|channel_client_flat  end_flat|end_permissions
    error id=0 msg=ok
    quit
    error id=0 msg=ok
    Connection closed by foreign host.
    [email protected]:~$
    Last edited by SilentStorm; August 10th, 2011 at 04:39 PM.

  12. #12
    Join Date
    July 2011
    Posts
    24
    with the 3.0.0 server i can still pull the snapshot, but importing it in another teamspeak server does not work:
    worked with rc1.

    bash putsnapshot.sh serveradmin PASSWORD localhost

    Echo unable to apply the snapshot
    This is what we got as answer to the commands use, login, serversnapshotdeploy, quit:
    TS3
    Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
    error id=0 msg=ok
    error id=0 msg=ok
    error id=1538 msg=invalid\sparameter
    error id=0 msg=ok

  13. #13
    Join Date
    June 2008
    Posts
    18,104
    error id=1538 msg=invalid\sparameter
    This can happen, when your "hash=SoK2DVyGPI6hvQWozamFKUBkvWA=" is not correct or when another parameter is incorrect.

    Hint: Don't forget to convert a snapshot from a linux server to windows
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  14. #14
    Join Date
    July 2011
    Posts
    24
    whats the hash for anyway?

    the hash is handled by the put/pullsnapshot script. the only parameters for both scripts that are needed are username/password/host
    the others are optional.

  15. #15
    Join Date
    June 2008
    Posts
    18,104
    I answered here
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. Creating Helper tag Ect
    By Toasty1 in forum Permission System
    Replies: 0
    Last Post: January 2nd, 2016, 08:52 PM
  2. Using Snapshot scripts for daily backup ?
    By Ahmed in forum Server Support
    Replies: 9
    Last Post: February 11th, 2015, 11:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •