TulipTools Internet Business Owners and Online Sellers Community

Full Version: Backing up MySQL Data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quote:If your MySQL server does not need to be available 24x7, a fast and easy offline raw backup method is:

  1.

      Stop the MySQL server:

      # /etc/init.d/mysqld stop

  2.

      Copy MySQL's data files and directories. For example, if your MySQL data directory is /var/lib/mysql and you want to save it to /tmp/mysql-backup:

      # cp -r /var/lib/mysql /tmp/mysql-backup

      Instead of cp, you can use rsync, tar, gzip, or other commands.
  3.

      Start the server again:

      # /etc/init.d/mysqld start

Online backups are trickier. If you have mutually independent MyISAM tables (no foreign keys or transactions), you could lock each one in turn, copy its files, and unlock it. But you may have InnoDB tables, or someone could write a transaction involving multiple tables. Fortunately there are several reasonable noncommercial solutions, including mysqlhotcopy, mysqlsnapshot, replication, and mysqldump...

full article: http://www.linux.com/article.pl?sid=07/05/21/162241