Magento 1 Quick Tips

Helpful Terminal Commands

To compress a copy of your database (make sure to clean up the database prior):

mysqldump -u mysql_user -pPasswordNoSpace databasename | gzip -9 > backup.sql.gz

To install a database from the compressed copy above:

gunzip < backup.sql.gz | mysql -u mysql_user -pPasswordNoSpace new_database_name

You can also just do “-p” without a password. After hitting enter, it will ask you for your password.