Our Sponsor provides IPTV Trial Service.

If you are an IPTV provider, you should highly care about the MySQL database as it is the heart of anything you have, anything you do. All tables are saved there. Knowing that brings up the Backup factor. A good IPTV CMS Software should have an auto-backupper feature but if it doesn't or you prefer doing it manually, you're gonna read this tutorial.

This tutorial has two parts:

-Removing logs to make the backup size smaller

-Taking the actual backup


-Removing logs to make the backup size smaller

Logging is a must do thing for every IPTV provider. It helps sourcing unwanted issues and leaks, but having logs piled up will cause the panel to run slowly. It would also add extra unnecessary size to SQL backup. Cleaning it would need a few simple TRUNCATE command lines to flush the content of log files. Files like client_logs, stream_logs, user_activity are the ones we need to worry about.


Command lines would be the following:

mysql --user=root --password=abcd1234 --database=xtream_iptvpro -s --execute="TRUNCATE client_logs;"
mysql --user=root --password=abcd1234 --database=xtream_iptvpro -s --execute="TRUNCATE stream_logs;"
mysql --user=root --password=abcd1234 --database=xtream_iptvpro -s --execute="TRUNCATE user_activity;"


Make sure you are logged in as root, where it says "password=" place your own mysql database password, "database=" should have the database name of your IPTV cms. Once you place the proper command line into the ssh terminal, hit enter and if all goes well, your ssh line comes one line down without any messages or anything.


-Taking the actual backup:

Now that we have cleared the log, it's time to create the backup file. The command line would be the one below:

mysqldump -u root -p xtream_iptvpro  > /home/mybackup01.sql


Once you execute the command, it will ask you for database password again, do that and hit enter. In the example above, we decided to save the mysql backup in /home/ folder of our linux machine.


Any questions? post it on WDS Community Forum and let us help you.

IPTV Free Trial available from our Sponsor's IPTV service.