Magento: Web store backup guideline

A system can fail no matter but how fast we can up the system and same applies to the Web store. Thus for preparation it is vital to have a good backup of all those files and database of the solution. For the reason this section describes the resources of different components of backups required for Magento, PHP, and Database. There are three sections which will help webshop to ensure what need to be backup regular basis and keep it safe for the situation of failure.

Magento Backup

This section lists the path of magento files which need to backup as following:

  • /app/etc/modules
  • /app/code/community
  • /app/code/local
  • /app/design
  • /skin/frontend/[your theme]
  • /media/catalog/

Database Backup

Another is most important in this section that is dump of magento database.

A) First Method
To backup magento database, following are the steps:

  • Position at the webshop-server in the directory /var/www/html/var or at that position where you want to save backup file.
  • Run this command:

mysqldump -h localhost -u [username]-p [database]> backupFileName.sql
E.g. mysqldump -h localhost -u root-p db_magento> db_magento_may22.sql

  • Enter database password:

root
Be sure to include the dump in backup.

B) Second Method
Database Backup from Magento Admin

Magento has a feature to backup database which is available in admin panel. Go to System > Tools > Backups, then click ‘backup’ to create backup file. This backup file will be stored in /var/backup directory or you can save from that backup admin section.

PHP System Backup

This section lists the path of PHP system files which need to backup are following:

  • Bin directory (/usr/local/bin)
  • PHP installation folder (/usr/local/apache2/php)

 

Enjoy !!!!!!!!!!!!!!!