Enable Automatic Backup in Magento 2

Magento gives you the facility to backup different parts of the System like- the file system, database, and media files and to roll back automatically. Using the GZ format, database backup files are compressed. Similarly, the TGZ format is used for the system backups and database and media backups.

Step 1: Login to your admin.

Step 2: Go to Stores > Settings > Configuration.

Step 3: Click on Advanced > System.

Backup Settings: To backup the different parts of the system like- the file system, database, and media files and to roll backup automatically, the following steps should be taken under consideration:

Enable Backup: It is selected to No by default for security reasons. Set it to Yes to enable the backup.

  • Enable Scheduled Backup: It is also selected to No by default. Therefore, set it to Yes to enable the other features of backup.
  • Scheduled Backup Type:  It comes with 4 types. They are as follows:
  1. Database: When scheduled backup type is selected to database then it will only backup the files related to the database.
  2. Database and Media: When scheduled backup type is selected to database and media then it will only backup the database and media related files.
  3. System: When scheduled backup type is selected to system then it will enable the backup of all parts of the system like- file system, database, and the media files too.
  4. System (excluding media): When scheduled backup type is selected to system (excluding media) then it will enable the backup of all parts of the system like- file system, and the database except the media files.
  • Start Time: In this option, set the time on which the backup process should be started.
  • Frequency: In this option, you can select either daily, weekly, or monthly backup depending upon your interest.
  • Maintenance Mode: In this option, you can set it to Yes or No depending upon your interest.

Click on Save Config.