azuremagento

Create and restore application backups

Backup

To create a backup of Magento, follow these steps:

  • Browse to Magento’s administration panel.

  • Navigate to the “System -> Tools > Backups” menu.

  • Find the three orange buttons near the top right corner. These perform the following functions:

    • System Backup will create a .tgz file with the entire source code of your Magento installation and your database. For most cases, this is the recommended backup option and the most complete. It may take several minutes.

    • Database and Media Backup will create a .tgz file with your Magento database and the contents of the media directory. Take care that this backup does not add other assets like theme files.

    • Database Backup will only create a .sql.gz file with the database of your Magento installation.

You may also put your Magento store in maintenance mode while creating the backup.

Magento backup

Restore

If you have a database backup file created using the admin interface, you can import and restore it when you need to. Two options are available when importing your database.

Using phpMyAdmin

NOTE: phpMyAdmin only allows upload of an 80MB database file or less. If your database file is greater than 80MB, use the command line instead.

  • Browse to phpMyAdmin and login with your username and password.
  • Navigate to Magento’s database.
  • Use the “Import” tab and select your .sql.gz file.
  • Click the “Go” button.

This might take a few minutes. Once done, you will see Magento’s tables in the database.

Using the command line

  • Navigate to your Magento installation directory using the server console.
  • Make sure that the database backup file is already present on the machine.
  • Enter the following command to import your database. Note that you must change the database name bitnami_magento if your database has a different name.

    $ gunzip > /path/to/database/file/magento.sql.gz | mysql -u root -p bitnami_magento
    
Last modification September 6, 2018