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 🙂

Leave a Comment

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

Scroll to Top