Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

How To Backup And Rollback In Magento 2

  1. #1
    [ Contributor ] Wajid Hussain's Avatar
    Join Date
    Nov 2014
    Thanked 11 Times in 9 Posts

    Default How To Backup And Rollback In Magento 2

    One of the most important aspects of running any online store is keeping a proper backup of everything so that in case anything goes wrong you can restore it with ease anytime. You can also adjust settings and edit your site without worrying that your web page will go offline. So as you can see, maintaining a backup of the site is pretty important.

    The functionality is built-in Magento 2 to ensure that the backup is created of the data and then it can restore all the codes, media and also your site’s database whenever you require it. At times it is a critical task to restore backups.

    There are many options available if you desire to make a back up of your site’s data. Through this article, we will guide you in steps how you can do the process of backing your data and then how you can restore it by the use of CLI commands.

    So let’s get started!

    Before We Begin

    Before going further, you must check that you have installed a working Magento 2 beforehand on your system. Now access the installation of your Magento 2 via the shell and you have to use SSH. First login via SSH, after this go to the app which is present at the root folder, bin, var folders are placed of Magento 2.

    Backup/Snapshot – How To Do It

    Once you are done with the step of changing Magento 2 directory to the root of it, install and run the command below:

    PHP Code:
    php bin/magento setup:backup -v –code –media –db 
    It will create three types of backups which include:

    1. Code
    2. Media, for example, the pictures or videos, etc.
    3. The data’s Database which is of high necessity for your store.

    Note that during the backup of your store, as it will change the mode of your site to maintenance mode. During the back up the live site of your store will not be available during backup and all of the backups will be stored in the var/backups

    Read Complete Article Here:

    View more threads in the same category:

  2. #2
    Junior Member
    Join Date
    Feb 2017
    Thanked 0 Times in 0 Posts


    I feel it interesting, your post gave me a new perspective! I have read many other articles about the same topic, but your article convinced me! I hope you continue to have high quality articles like this to share with veryone! Good luck!
    slither io

  3. #3
    New member LanHuong6118's Avatar
    Join Date
    Oct 2017
    Thanked 0 Times in 0 Posts


    I feel interesting too, very useful thread

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts