Hi,
You can schedule mysql backup using cron. Please use following script to take backup using cron. Create file in public_html and correct the permissions/ownership.
Quote:
|
#vi /home/cPanel-User/public_html/Script-For-Backup.sh
|
Add following code into the above mentioned file.
Quote:
#/bin/bash
/usr/bin/mysqldump –user=Database_User –password=***** –databases Database_Name | gzip > /home/cPanel-User/db_name-`date “+%Y%m%d%H%M”`.sql.gz
|
Note :-
Database_User is the database user
Database_Name is the database name
***** is the password of database user
+%Y%m%d%H%M is the time stamp
cPanel-User is username of account
The backup file will create under directory "/home/cPanel-User/". Now, you need to add cron. You can do it with the help of your control panel.
Quote:
|
0 0 * * * /home/cPanel-User/public_html/Script-For-Backup.sh
|
This cron will executes every day at 00:00 hour and creates backup file for your MySQL.
=========
Ralph Debus