How to Create Backups for Your Magento 2 Store?
- Nidhi Arora
- 3 years
- 70 views
Even though Magento 2 is considered as the most secure platform, but there are always unexpected moments when your Magento 2 store could break. For instance, a server crash, exploits, hacking, bugs and other mistakes. Thus, it’s beneficial to have the backups of your Magento 2 store so that you can recover your store quickly whenever you need.
Note: Restoring a backup of your M2 store will only recover the data that was last saved by you.
There are two methods to create a backup for your Magento 2 store. The first one is to create a backup via admin panel and the second one is to run a backup through the command line of your server. In this “How To” blog, we will explain you both these methods and steps needed to create backups for your M2 store:
M2 Backup Via Admin Panel
Step 1: Login to your M2 admin panel
Step 2: Now navigate to this path System > Tools > Backups
Step 3: Here on this page you will find backup options:
The System Backup will be all of your files and the code itself.
The Database Backup will be your database tables consisting of items, such as, order, customer details, and admin configurations.
And, the Media Backup is going to be all of your media folders, plus the largest backup because it covers your images and videos.
After the Backup selection, you will observe a page where you should name the backup file. We recommend you to use the data and the type of backup while naming the backup file (only for easy reference). Make sure you’re placing your store into a maintenance mode during the backup process. It will help you to limit the amount of data that is altering during this backup process. You can go for the final option if you prefer to isolate the media folder from the backup. As you know, it is the largest set of files, and for many Magento 2 stores, these elements are not going to alter as commonly as other sections of the store.
After creating the file, you can tap the filename to download the backup. Moreover, you can also restore your store back to your previous version of the store. By using this powerful tool, you can eliminate any of the new data on your Magento 2 store that was excluded from that backup process. You only need to ensure about the data you will be eliminating by restoring to any of your backup files.
MM2 Backup Through the Command Line
This method is mostly preferred by developers as it is very easy for them to implement into a Magento site. For more details on using and implementing this command line M2 backup, you can refer to Magento Dev Docs.
That’s all what you need to do for creating backups for your Magento 2 store. It is quite explained so you may have no issue while performing these methods. In case you face any difficulty, you can contact us at [email protected] to get a helping hand from our certified Magento developers.