How to Backup Magento 2 Store?

How to Backup Magento 2 Store

Are you looking to backup Magento 2 store?

Great decision.

Backups can be a lifesaver in case of hacking, file corruption, and any unfortunate and unexpected event. 

People ignore backups, thinking there is always time. Until there is no time to do it, they find themselves in a situation where they need the backups.

The best time to backup a Magento 2 store is now.

Why is Magento Backup Important?

The aim of the Backup is to have a secure copy of your store all the time, so if something happens to the original, you can replace it with the copy.

Cyber-attacks, hackers, outdated themes and extensions, poorly coded modules, and incompatible technology can break the Magento store.

Without backups, you will be stuck with hours of work to clean your store and revamp it.

The store changes new files and folders, data, and orders every day. So you have to create the Backup every day to keep the copy updated. This can be done by scheduling the Backup.

This quick tutorial will show you how to backup Magento 2 store. You do not need to install any Magento extension for backups.

How to Backup Magento 2

There are three methods to backup Magento 2:

  1. Magento 2 backup via Command Line
  2. Magento 2 backup via Admin Panel
  3. Magento 2 backup via Breeze

I’ll discuss each of the methods here.

#1 Magento 2 backup via Command Line

You can take the Magento 2 backup with the CLI. Run the following command to start the Backup:

magento setup:backup [--code] [--media] [--db]
  • –code: Backing up the whole Magento system, excluding var and pub/static folders
  • –media: Backing up pub/media folder
  • –DB: Backing up Magento 2 database

The command will enable the maintenance mode, make the Backup, and then disable the maintenance mode. However, you have to be a system file owner to execute the command.

#2 Backup Magento 2 via Admin Panel

If you have admin dashboard access, you can take the Magento backup from there too.

Log in to the Admin panel and navigate to System > Tools > Backups.

Follow the below steps:

#2.1 Select the Backup Type

Type of Magento Backup

The admin panel offers three types of backup types:

  1. System Backup: Creates and saves a complete copy of the database and the file system. You may include a backup to the media folder as per your choice.
  2. Database and Media Backup: Creates a full copy of the current database and the media folder
  3. Database Backup: Only forms and stores a copy of the database.

When taking Magento 2 backup, you should:

  • Enable the maintenance mode option during the Magento backup to avoid any inconvenience. Once you are done taking the Magento backup, maintenance mode will turn off automatically.
  • If you want to include the media folder, don’t forget to check the Include Media folder to System Backup.

#2.2 Name the Backups

  1. Backup Name: Enter the term you want to name the Backup. When creating a backup name, use only a-z/A-Z letters, 0-9 numbers, and spaces.
  2. Maintenance Mode: You may enable the maintenance mode in your store during the backup, which will result in reduced page speed, but the site will be inaccessible at the time of the process until the maintenance mode is turned off again.
  3. Exclude: You can exclude the media folder from taking Backup. Including the Media folder will increase the backup size.

#2.3 Verification

A notification will be displayed: The Backup is Complete.

It means the Backup is successful, and everything went fine. There are no errors to worry about.

#3 Using Breeze to Backup Magento 2

If your Magento store is on Breeze, you do not have to do anything and let Breeze manage the backups. You can schedule the daily automatic backups and forget about them.

Here are a few simple steps to take the backups to your local computer.

  1. Login to your Breeze Platform
  2. Select the Company you would like to work on
  3. Click on the ‘Sites’ to open the site list.
  4. Open the ‘Store’ whose Backup you like to download.
  5. Click the ‘Backups’ option from the list.
how to backup Magento - breeze

Manual Backup: You can manually start the Backup anytime from the Breeze platform.

Number of Backups: The number of backups depends on the plans.

Automatic Daily Backup: You can enable the automatic Backup, and Breeze will do it for you.

Retention time: The retention time depends on the plan and Backup type. The manual Backup does not get deleted until you run out of backup amount. Then it will delete the outdated Backup to make space for the recent Backup.

Wrap Up

I hope this tutorial helped you to take the Magento 2 backup. This quick article highlights the importance of keeping the updated Backup of the Magento store.

You can use the inbuilt Magento 2 feature, run several commands or use Breeze to take the Backup. However you do, you must ensure the backups are active.

If you do not get time to manage the backups, a managed Magento hosting could be the solution for you.

At Breeze, we keep the Backup of all the stores, and you can access them at any time. Besides backups, the Breeze platform has many features that secure your store and speed up the website.

Book a quick demo today.

If you have any questions or queries, feel free to ask anytime in the comment section below.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new plugins, and more. 100% Magento Goodness, a promise!

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

Talk to a sales representative

USA / Worldwide

+1.714.2425683

India

+91.9852704704

We can help you. Right now.

Fast growing merchants depend Breeze for high-performance hosting. Experience counts. Let's get started.

Request demo

Please fill in the details below and we’ll reach out to you with a customized demo of our product!

Get your FREE Image SEO Checklist

Bring more visitors to your image from Google search from the existing images.