A recent survey shows that 44% of data loss is caused by mistaken deletion, system crash, or software corruption.
Just imagine you have put in countless hours and efforts into building your Magento store, but in the end, all your efforts go in vain. Well, that’s the worst case scenario.
What you need is a viable solution to schedule your Magento application backup in a few steps and restore all the files and database of your Magento store. You will also want to have your server’s backup on demand at any instant.
- Why Server & Application Backup Are Important?
- How to Take Magento Application Backup via Admin Panel
- How to Schedule Magento Backup via Admin Panel
- How to Backup Magento Application via Admin Panel
- How to Schedule Magento 2 Backup
- Magento Server Level Backup with Cloudways
- Apply and Configure Magento 2 Custom Theme in Admin
- Magento Application Level Backup with Cloudways
- Frequently Asked Questions
- Inheritance of Theme
- Wrapping Up!
Why Server & Application Backup Are Important?
The major reason for taking backup is to create a copy of data to ensure Magento security and availability of data at all times. The cyber attacks can range from data corruption, malicious scripts or accidental data loss. In such cases, the Magento backup facility comes in handy, allowing you to restore your application and let you continue your work.
Cloud storage offers one of the alternative media to store your data backup. It offers quite a secure way to keep Magento application and server backup.
When it comes to Magento store application backup, there are various options available. In this tutorial, I will explain as to how you can create a Magento backup for your websites.
Let’s get things done!
How to Take Magento Application Backup via Admin Panel
In this section, you will learn as to how you can take the Magento application back up through the Magento Admin Panel. The process is quite simple.
- Log in to your Magento 1 admin panel and click System > Tools > Backups.
- Select one of the following data backup types, depending on the type of Magento backup you need to create:
- System Backup
- Database and Media Backup
- Creates a backup of the database and the media folder
- Create a backup of the database
- Click OK to continue.
- If you want to put the store into maintenance mode during the Magento backup, select the checkbox.
How to Schedule Magento Backup via Admin Panel
You can also schedule a Magento backup through Admin panel. It’s a six-step procedure.
- On the side menu bar, select System > Configuration and under Advanced, select System.
- Expand the Scheduled Backup Settings section.
- Set Backup Type to one of the following:
- Database and Media
- System (excluding Media)
- Set the Time of the Magento backup with: Hour, Minute, and Second.
- Set the Frequency of the backup: Daily, Weekly or Monthly.
- Hit the Save Config button.
Note: The Magento system backup facility is not available for Magento 1.9.4 or less.
How to Backup Magento 2 Application via Admin Panel
In this section, you will learn to take Magento application backup through the Admin Panel.
- Log in to your Magento Admin Panel with your credentials (username and password) for Magento 2 backup.
- On the left admin sidebar, click System > Backup.
You will see the following message:
Don’t worry though. Just follow these steps to enable the Magento database backup functionality:
- On the admin sidebar, click Store > Configuration and navigate to the Advanced section and click System.
- Enable the backup option by using the dropdown menu to Yes.
You can also take Magento store backup by using the CLI command:
php bin/magento config:set system/backup/functionality_enabled 1
3. In the upper-right corner, you will see the buttons for the type of Magento backup you want to create:
- System Backup: This option allows you to create a complete backup of the database and the file system. During the process, you can choose to include the media folder in the backup.
- Database and Media Backup: Create a backup of the database and the media folder.
- Database Backup: Creates a backup of the database.
While taking a backup of your Magento application, you must:
- Check the maintenance mode option during the Magento backup so you can avoid any inconvenience. Once you are done, the Magento backup, maintenance mode will turn off automatically.
- While taking a system backup, check the Include Media folder to System Backup if you want to include the media folder as well.
How to Schedule Magento 2 Backup
In this section, you will learn about scheduling Magento 2 backup. It’s a four-step process.
- On the Admin menu bar, select System > Configuration
- Under the Advanced section, choose System
- Expand the Scheduled Backup Settings section.
- Set Magento 2 backup type: Database, Database, and Media, System and System (excluding Media)
- Set the frequency of the backup: Daily, Weekly, and Monthly
- Hit the Save Config button.
Well, that’s the first part of how you can schedule Magento 1 & 2 backup.
As a store owner or a developer, you must regularly keep an eye on the server configuration settings as well.
Here, I would like to ask you a question.
The question is: how can you manage and maintain the Magento database backup on the server level? Cloudways managed hosting platform has got you covered. The managed cloud hosting platform offers you the opportunity to maintain application and server backups without any complexities.
Magento Server Level Backup with Cloudways
Cloudways is a managed Magento hosting partner which offers a user-friendly environment to manage your Magento websites with ease. Cloudways offers you user-friendly features to manage your server backup.
Set backup frequency ranging from one hour to seven days. The platform will take a full server backup at your chosen frequency.
Set the specific time to schedule your Magento server backup.
Set the backup retention time for your Magento server. The server backup is retained for upto one week.
By enabling this option, you can create an additional copy of your server backup by the name of (local_backup), and download it via SFTP/SSH.
And that’s it. You are good to go with your first Magento server backup.
Also, you can take server backup on-demand at any instant. For this, you must click on Take Backup Now button. It will take time depending on the size of the files.
Magento Application Level Backup with Cloudways
Cloudways has introduced application backup feature to help you take a backup of your application without any fuss. You can create multiple on-demand backups and restore your application any time you deem necessary.
This feature is applicable for both the Magento versions 1 and 2.
Frequently Ask Questions
Where are Magento backups stored?
Backups are stored in the var/backups directory.
How long does a full Magento backup take?
Backup time depends on how many products & customers you have.
If you are facing any issues. You can truncate all log data in your database instead of manual backup, you can take backup at night time by setting scheduled backup System > Configuration > Advanced > system> Scheduled backup settings. Also, you can take backup in phpmyadmin by importing the Database. If you have ssh access, you can take backup by commands: mysql -uUSER -p -hHOST DB_NAME < db_dump.sql
How to restore magento from backup?
You can restore the Magento application at any time using the magento setup:rollback command. After backing up, you can roll back at a later time.
This brings us to the end of this article. This article highlights the importance of maintaining a server and application backup, and how you can use Magento backup feature to keep your online store live and running. Remember that a cloud hosting provider such as Cloudways offers a secure and scalable cloud hosting solution which provides both automatic and manual Magento backup capabilities. This saves you a lot of hassle and ensures that you can recover from disaster almost immediately.
If you have any questions and query feel free to ask anytime in the comment section below.
Abdur Rahman is the Magento whizz at Cloudways. He is growth ambitious, and aims to learn & share information about Ecommerce & Magento Development through practice and experimentation. He loves to travel and explore new ideas whenever he finds time. Get in touch with him at [email protected]