IndianWebPortal.com

Something Different In Linux

Home » cpanel » daily mysql databases backup on cpanel server

daily mysql databases backup on cpanel server

Posted by Rishikesh Vispute Categories: cpanel, mysql, Uncategorized

Question: How to back up MySQL databases using cron jobs on cpanel server ?

Ans: You can take the mysql backup of all databases for last 10 days and keep on the server.  You need to add the cron to create the daily mysql backup of all the databases. The backup is stored in the folder “/home/backups/mysql”.

1) You can dowload the mysqlbackup script by using the URL “ http://www.indianwebportal.com/downloads/mysqlbackupscript.txt

2) Then open the file and add the same content in following file

vi /etc/cron.daily/mysqlbackup.sh

save file

3) chmod 755 /etc/cron.daily/mysqlbackup.sh

4) Test the file is working or not

sh /etc/cron.daily/mysqlbackup.sh

5) If it is working then it shows following output and  if any problem then check the error and solve it.

==============

MySQL root password correct.

Backup directory: /home/backups/mysql/2015_03_25_16_09
Creating backup of “information_schema” database

==============

6) done


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...