How to create back in magento 2 via command line

here is a simple command used to create backup :
Below cmd creates full system backup containing Magento 2 file system, the media directory, and the database; you can see the corresponding flags –code, –media, –db I used.

php bin/magento setup:backup --code --media --db

It automatically enables maintenance flag and disable once completed.

Happy coding 🙂

1 thought on “How to create back in magento 2 via command line”

  1. Hello.

    Good cheer to all on this beautiful day!!!!!
    Nice blog, This will help all the devs out there.

    Good luck 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top