Table of Contents
Just imagine waking up one day and finding your Magento 2 store is down. There can be multiple reasons for a store to crash, for example, due to a misconfigured extension, some system error, or another configuration issue. Are you willing to put your entire business at risk? Having a backup can help avoid such disasters.
Fortunately, Magento 2 allows you to configure an automatic backup of your store to protect your data. In this guide, we will discuss how to enable automatic backups.
Enabling Automatic Backup in Magento 2
Magento 2 provides built-in options to automate backups. Follow these steps to enable it:
Step 1: Access the Backup Settings
- Log into your Magento 2 Admin Panel.
- Navigate to Stores > Settings > Configuration.
- In the left menu, go to Advanced > System.
Step 2: Configure Backup Settings
Expand the Backup Settings section and configure the following options:
- Enable Backup: Set to Yes to activate backup functionality.
- Enable Scheduled Backup: Set to Yes to allow automated backups.
- Scheduled Backup Type: Choose the type of backup:
- Database: Backs up only the Magento database.
- Data and Media: Backs up database and media files (e.g., product images).
- System: Backs up the entire Magento store, including files and database.
- System (excluding Media): Backs up all files except media files.
- Start Time: Set the time for backup execution.
- Frequency: Choose how often to run backups (Daily, Weekly, Monthly).
- Maintenance Mode: Set to Yes to put your store in maintenance mode during the backup process.
Step 3: Save the Settings
Click Save Config to apply the changes.
Step 4: Verify Backups
- Go to System > Tools > Backups.
- Check the list of backups and their timestamps.
- Perform a manual backup to confirm everything is working correctly.
Conclusion
Regular backups are paramount for Magento 2 store security. The built-in feature allows easy scheduling of an automatic backup in Magento 2. By following the above described steps, you can automate your backups and focus on running your business without worrying about data loss.