Quick MySQL backups

As a hosting provider we are often asked to provide a backup or dump of a mysql database. The easiest way to do it is to performa MySQLdump into a file into the webspace and the secure it with file permissions:

# cd /path/to/website
# mysqldump -root -p database_name > dump.sql
# chown ftp_user dump.sql
# chmod 0600 dump.sql 

Thats the lot!

This entry was posted in Apache, FreeBSD Administration, MySQL and tagged , , , . Bookmark the permalink.

Leave a Reply