using cron to backup mysql

admin

Administrator
Staff member
Heres what the cronjobs file has in it;

0,15,30,45 * * * * /usr/home/foo/cronscripts/logfiles/sql.sh

Contents of sql.sh;

#!/bin/sh
# this script will backup the mysql database
# and create a file to be downloaded
# via FTP scheduler
mysqldump -h hostname -u username -pmypass links > /usr/local/www/foo/sql/links.sql
mysqldump -h hostname -u username -pmypass mysql > /usr/local/www/foo/sql/mysql.sql

Question is, will this work correctly?

oli
 
Back
Top