Magento database dump on live site

Written by Peter Davies on .

On a live Magento store you need to be careful not to run any command that could affect the operation of the site, especially if the site is busy 24/7. The suggested solution is to perform the following mysqldump command:

mysqldump --single-transaction --skip-lock-tables -u root -ppass dbname > dump.sql

This combination attempts to extract the complete database without locking, i.e. the client can still save products and perform most admin area functionality without being blocked for any reason.