How to create full backup in Magento 2(files too) 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 🙂

5 thoughts on “How to create full backup in Magento 2(files too) 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 Reply to ronicky p Cancel Reply

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

Scroll to Top