kaz Posted March 4, 2005 Posted March 4, 2005 How can I perform a mySQL database backup everyday and send it to my email or put it somewhere I can download it -Thanks kaz Quote
TweezerMan Posted March 4, 2005 Posted March 4, 2005 1) This is the command I use in a cron job to make a backup of my MySQL database each day: >mysqldump --quick --all --add-drop-table --add-locks --lock-tables --quote-names --user=cpanelname_dbusername --password=dbpassword cpanelname_dbname | gzip -c > /home/cpanelname/path/to/backup/folder/dbname-daily.sql.gz cpanelname = your CPanel user name dbusername = your MySQL database user name dbpassword = your MySQL database password dbname = your MySQL database name The mysqldump utility has a lot options - you can read about all of the options it supports in the MySQL documentation for mysqldump. 2) Searching the forums, I found this thread, which discusses MySQL database backups and includes a link to a php script that will make a MySQL database backup and optionally e-mail it to you. 3) Search the forums for mysqldump - there's about a dozen threads with discussion on it and database backups in general. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.