Magento 2 Automatic Backup: 7 Steps to Enable Automatic Backup

Magento 2 Automatic Backup: 7 Steps to Enable Automatic Backup

Have you ever lost key data from your Magento store? Magento 2 automatic backup saves you from such disasters. It allows you to schedule regular backups of your store's data. This tutorial explores steps for enabling automatic backups, best practices, and troubleshooting tips.

Key Takeaways

  • Learn how to enable automatic backups in Magento 2 to protect your store’s data.

  • Understand the benefits of automatic backups including data loss prevention and time-saving convenience.

  • Discover customizable backup options to tailor the backup process according to your needs.

  • Explore best practices for scheduling, storing, and verifying backups to ensure data integrity.

  • Get troubleshooting tips for common auto backup issues to keep your backups running smoothly.

Why Use Automatic Backup in Magento 2 Store?

Why Use Magento 2 Automatic Backup

1. Data Loss Prevention

Automatic backups protect your Magento store from data loss.

They create regular copies of your store's data. It includes databases, system files, and media files. If any data is accidentally deleted, corrupted, or lost, you can easily restore it from the backup. It ensures that your store's data remains safe and secure.

2. Time-Saving and Convenient

Setting up automatic backups in Magento saves you time and effort. You don't have to manually create backups regularly. Once configured, Magento will automatically create backups at the specified intervals. It happens without any manual intervention. This convenience allows you to focus on other important aspects of your business while ensuring that your data is regularly backed up.

3. Customizable Backup Options

Magento provides flexible backup options to suit your specific needs. You can choose to backup only the database, system files, media files, or a combination of these. You can also set the frequency of backups (daily, weekly, or monthly). Additionally, you can specify the start time. This customization allows you to tailor the backup process according to your store's requirements and server resources.

4. Compressed Backup Files

Magento uses efficient compression formats to reduce the size of backup files. It employs the GZ format for compressing database backups. It uses the TGZ format to compress system backups and combined database and media backups. Compressed backups take up less storage space on your server. It allows you to store multiple backups without consuming excessive disk space.

5. Easy Restoration Process

Magento's automatic backups simplify the restoration process in case of data loss or the need to revert to a previous state. With readily available backup files, you can quickly restore your store's data to a specific point in time. It minimizes downtime. It ensures that your store can be up and running again with minimal effort. Automatic backup reduces the impact on your business operations.

7 Steps to Enable Automatic Backup in Magento

Step 1

Log into your Magento Admin Panel Dashboard.

Step 2

Go to Stores > Settings > Configuration in the navigation menu.

Configuring Magento 2 Automatic Backup

Step 3

Expand the ADVANCED menu and choose System.

Expand Advanced Menu for Magento 2 Automatic Backup

Step 4

Open the Backup Settings section. Set Enable Backup to 'Yes'.

Step 5

Set Enable Scheduled Backup to 'Yes' as well.

Step 6

Configure the automatic backup settings:

Settings of Magento 2 Automatic Backup

  • Choose the Scheduled Backup Type from the dropdown menu. Options include Database, Database and Media, System, and System (excluding Media).

  • Set the Start Time for the backup using the hh:mm:ss format.

  • Specify the Frequency of the backups - Daily, Weekly, or Monthly.

  • Decide whether to enable Maintenance Mode during backups by selecting 'Yes' or 'No'.

Step 7

Click the Save Config button in the top-right corner to apply the changes.

Magento 2 Backup Types & their Use Cases

Type of Backup in Magento Use Cases
System Backup Use for full recovery in case of major issues.
It includes everything: media, file system, and database.
Ideal before major updates or changes.
Ensures all components are saved.
Use to restore the entire system quickly.
Database and Media Backup Use when media and database changes are critical.
Ideal for content updates.
Helps in media management and database consistency.
Use before media migrations.
Ensures both media files and database are saved.
Database Backup Use for quick database-only recovery.
Ideal for frequent database updates.
Helps in maintaining database integrity.
Use before running scripts or queries.
Ensures only the database is backed up.

Magento Backup Best Practices

1. Schedule Regular Backups in Magento 2

Regularly scheduled backups ensure you always have the latest version of your data. Set up daily or weekly backups based on your update frequency. Automated backups reduce the risk of human error. Consistent backups help maintain data integrity and recovery readiness. Regular schedules keep your data safe and current.

2. Store Backups Offsite

Storing backups offsite protects against local disasters. Use cloud storage or remote servers for your backups. Offsite storage ensures data safety from physical damage. It also provides quick recovery access in emergencies. Secure offsite locations reduce risks and enhance data protection.

3. Verify Backup Integrity

Always verify the integrity of your backups. Test your backups periodically to ensure they are complete. Verification helps detect any issues early. It ensures your backup files are not corrupted. Regular checks guarantee reliable data recovery.

4. Use Encryption for Backup Security

Encrypt your backups to protect sensitive data. Encryption adds an extra layer of security against unauthorized access. Use strong encryption methods for best results. Secure backups help comply with data protection regulations. Encryption ensures data safety during storage and transfer.

5. Maintain a Backup Rotation Strategy

Implement a rotation strategy to manage backup versions. Keep multiple backup copies in different locations. Rotate backups regularly to avoid data loss. A rotation strategy ensures you always have recent and older backups available. It provides a reliable way to recover from various data loss scenarios.

Troubleshooting Tips for Auto Backup Issues

Issues Solutions
Backup Fails to Start Check your backup settings and ensure they are correctly configured.
Verify your server resources and make sure there is enough space.
Update your backup software to the latest version.
Restart your server to clear any temporary issues.
Ensure you have the necessary permissions to execute the backup.
Incomplete Backups Ensure your server has enough disk space.
Check for any network interruptions during the backup process.
Verify the integrity of your backup scripts.
Update your backup tools to avoid bugs.
Split large backups into smaller parts for better management.
Slow Backup Process Optimize your server performance to handle backups efficiently.
Schedule backups during off-peak hours.
Compress your backup files to speed up the process.
Ensure you have a fast network connection.
Update your backup software to improve speed.
Backup Corruption Verify the integrity of your backup files regularly.
Use reliable storage solutions to prevent corruption.
Encrypt backups to enhance data protection.
Ensure proper shutdown of backup processes.
Regularly update your backup tools.
Permission Errors Check and update your user permissions.
Ensure the backup process has the necessary administrative rights.
Verify the file system permissions.
Use scripts with elevated permissions.
Regularly audit your security settings.
Missed Scheduled Backups Verify your backup schedule settings.
Ensure the cron jobs or scheduled tasks are running.
Check for any conflicting tasks that might interfere.
Monitor your backup logs for errors.
Keep your system clock synchronized.
Backup File Not Found Check the backup destination path.
Verify the storage location is accessible.
Ensure there are no typos in the backup script.
Regularly update your storage path settings.
Keep a log of your backup destinations.
High Resource Usage Optimize your backup process to use fewer resources.
Schedule backups during times of low activity.
Limit the number of simultaneous backups.
Monitor your server performance regularly.
Adjust your backup settings to balance load.


1. How do I create a backup in Magento 2?

To create a backup in Magento 2, go to the Admin Panel. Navigate to Stores > Settings > Configuration. Select Advanced and then System. In the Backup Settings, enable backups and choose your options. Save the configuration to initiate the process.

2. Can I back up Magento 2 using the command line?

Yes, you can back up Magento 2 using the command line. Use the bin/magento setup:backup command. Specify the type of backup: database, media, or code. This method is efficient and automates the backup process.

3. How do I perform a rollback in Magento 2?

To rollback in Magento 2, use the command line. Execute bin/magento setup:rollback --db-file=db.sql. This command restores the store to a previous state. Ensure you have recent backups before performing a rollback.

4. Is Adobe Commerce different from Magento 2 for backups?

Adobe Commerce and Magento 2 share similar backup processes. Both platforms support automatic backups. Use the Admin Panel or command line to manage backups. Ensure you follow best practices for reliable data protection.

5. What should I consider when backing up Magento 2?

When you back up Magento 2, ensure you include the database, media, and system files. Use compression to save space. Schedule regular backups to prevent data loss. Verify backup integrity regularly for reliable recovery. Always choose dedicated Magento hosting.



Magento 2 automatic backup ensures the safety and integrity of your store's data. By setting up regular backups you can:

  • Prevent data loss and ensure quick recovery in case of emergencies.

  • Save time and effort with automated backup processes.

  • Customize backup options to suit your store's specific needs.

  • Optimize storage space with compressed backup files.

  • Simplify the restoration process for minimal downtime.

Consider a managed Magento hosting to configure Magento backups easily.

Shivendra Tiwari
Shivendra Tiwari
Technical Writer

Shivendra has over ten years of experience creating compelling content on Magento-related topics. With a focus on the Magento community, he shares valuable tips and up-to-date trends that provide actionable insights.

Get the fastest Magento Hosting! Get Started