Wrote a backup script for Linux

mercredi 26 août 2015

Hey guys,

I wrote a backup script and figured it might be useful to some others out there. It runs on debian but should also work on osx/freebsd as well:
http://ift.tt/1UcJeaa

To install it extract it to any location you'd like.
Edit the file "serveradmin" to contain your serveradmin pw.
Edit server_port to contain the port numbers you are running on your server, each on their own line.
Edit ts3backup for the following variables:
TS3SERVER='hostname' #this can be an IP as well
PORT='10011' #Default query port, change if necessary
DIRPATH='/path/installed/to' #path to where you installed the script to.

This basically just connects to the server using a standard unencrypted TCP Session and executes the "serversnapshotcreate" command. As a result you need to take care in how it is used. I recommend running this on the teamspeak server directly. Results are logged to the file:
log/output.log

That output.log will contain your serveradmin pw so be sure it is also set to permissions 600 so it is not readable by other users.

You can schedule this to run weekly using a cron process:
0 5 * * 1 /home/user/ts3backup/ts3backup >> /home/user/ts3backup/log/output.log

I have not tested the restore functionality and I backup my database as well but it should work. Here is an article about the serversnapshotcreate command:

http://ift.tt/1UcJeac

Enjoy
Wrote a backup script for Linux

0 commentaires:

Enregistrer un commentaire