Whether you’re an experienced store owner or a newbie, by now you should’ve already come to terms with having to create backups before each small or significant website modification (e.g., Magento backup and restore). It is, in fact, a rule of proper website management.
Migration of data, especially for large businesses, is a complicated and, at times, risky procedure. So, Cart2Cart takes the security aspect of it very seriously. We create backups on your source and target stores before each Magento database migration and even before the free Demo migration (if you choose so).
However, some might still want to go the extra mile and create database backups independently. Understandably - that’s the one kind of paranoia we fully endorse. If you happen to be a Magento running security freak, the following post is just for you. It describes two simple ways of making data backups and restoring stores from them properly during the Magento database migration.
Magento Database Migration: How to Backup and Restore Files in a Few Simple Steps
Magento 1.x Version
Despite the overall complexity Magento brings, the procedures of backing up and restoring data are relatively straightforward:
- Log in to your Magento admin panel
- Step to System → Tools → Backups
- You will see three options there - System Backup, Database and Media backup, Database backup
- See for yourself which option to choose, and click one of the orange buttons.
- Confirm your intention in the Warning window and specify the backup name in the box that’ll appear next.
- Wait till the Database backup has been created! message appears on the screen. When it happens, pat yourself on the back - you’ve done well.
System Backup is the most radical one - it’ll pack your entire source code with database into one tar archive.
Database and Media backup will save your database and media folder’s content. Entities like store themes are not included.
Finally, Database Backup is self explanatory - it will take your Magento store data dump.
Also, you can turn the maintenance mode on while the procedure is in progress. We recommend putting a tick next to it so that no database changes happen while you are backing it up.
Besides Magento’s dashboard, you can log in to your hosting admin panel and backup database from there.
Since lots of our users seem to use cPanel, we’ll take it as an example:
- Log in to admin panel, find the Files section and press Backups
- Again, choose for yourself what kind of website backup to create - full, partial, or just the database backup. In case of the most later option - click on on the name of the needed database.
- That’s it, in a few minutes look for the database archive in your Downloads folder.
Restore Data from Database Backup
Restoring Magento databases doesn’t deserve a separate instruction since the entire procedure consists of one step.
In Magento admin panel:
Navigate to System → Tools → Backups, pick the needed backup from the list and click Rollback
In your hosting’s cPanel:
Go to Backups in the Files section, under Restore a Database MySQL Backup, upload your backup archive.
Magento 2.x Version
How to Backup the Database?
- Open your Magento admin panel
- Go to System → Tools → Backups
- Choose the type of backup you wish to create (i.e., System Backup, Database and Media backup, Database backup) and tap on the corresponding button in the right upper corner
- Set the backup name. Also, we recommend you to put your store to the maintenance mode.
- Once done, click the Ok button
Note: Magento database backup may take from 20 sec. up to a few minutes. It usually depends on the database size, server capabilities, etc.
How to Restore the Database?
- Go to the Backups menu in the Admin panel
- Select the necessary backup file you wish to restore and click on the Rollback link
- After that you will receive the system warning. Tap Ok to proceed with the rollback
- Fill in your User password and put the store into the maintenance mode by ticking the corresponding box
- Click the Ok button to start the rollback
These are not the only methods to backup and restore the Magento database but certainly the easiest ones. Should you have other suggestions on the subject, please share them in the comment box.
If you'd like to perform the Magento database migration, Cart2Cart will gladly lend you a helping hand. Do not hesitate to run a free Demo now!