Hey guys,
I made a backup script for my teamspeak server and figured it might be useful for others. It uses the serversnapshotcreate command for the functionality. To learn more about this command and what it does please read this:
http://ift.tt/1UcJeac
My script is posted here:
http://ift.tt/1UcJeaa
A few notes. The password is stored in plain text and written to the log file as such.. Ensure they are properly secured by setting the file permissions to 600.
To install extract it to your ts3 user folder:
/home/ts3user/ts3backup/
set ownership:
chown -R ts3user:ts3user
set permissions:
chmod 600 /home/ts3user/ts3backup/*
chmod 600 /home/ts3user/ts3backup/log/*
edit your password file:
serveradmin
Provide a list of ports that you will back up - each on their own line:
server_port
configure the script:
TS3SERVER='hostname' #can be hostname or IP
PORT='10011' #default port - change if necessary
DIRPATH='/path/installed/to' #ex: /home/ts3user/ts3backup/
Once done you can test it using this command:
/home/ts3srv/ts3backup/ts3backup >> /home/ts3srv/ts3backup/log/output.log
This runs the script and outputs the result into your log file for review.
You can set up a cronjob to run it:
0 5 * * 1 /home/ts3srv/ts3backup/ts3backup >> /home/ts3srv/ts3backup/log/output.log
Hope you find it useful.
-Matt
I made a backup script for my teamspeak server and figured it might be useful for others. It uses the serversnapshotcreate command for the functionality. To learn more about this command and what it does please read this:
http://ift.tt/1UcJeac
My script is posted here:
http://ift.tt/1UcJeaa
A few notes. The password is stored in plain text and written to the log file as such.. Ensure they are properly secured by setting the file permissions to 600.
To install extract it to your ts3 user folder:
/home/ts3user/ts3backup/
set ownership:
chown -R ts3user:ts3user
set permissions:
chmod 600 /home/ts3user/ts3backup/*
chmod 600 /home/ts3user/ts3backup/log/*
edit your password file:
serveradmin
Provide a list of ports that you will back up - each on their own line:
server_port
configure the script:
TS3SERVER='hostname' #can be hostname or IP
PORT='10011' #default port - change if necessary
DIRPATH='/path/installed/to' #ex: /home/ts3user/ts3backup/
Once done you can test it using this command:
/home/ts3srv/ts3backup/ts3backup >> /home/ts3srv/ts3backup/log/output.log
This runs the script and outputs the result into your log file for review.
You can set up a cronjob to run it:
0 5 * * 1 /home/ts3srv/ts3backup/ts3backup >> /home/ts3srv/ts3backup/log/output.log
Hope you find it useful.
-Matt
0 commentaires:
Enregistrer un commentaire