Magento backup functionality is helpful to backup the,
1. Magento file system (excluding var and pub/static directories)
2. pub/media directory
3. Magento 2 database
Backup File Path :
Backups are stored into following path, root/var/backups directory and can be restored at any time. Automatically maintenance mode will enable once after hit the backup commands. Once backup is done than maintenance mode will be deactivate by default.
Backup command for code and DB:
–code : Backup the Magento files(except var and pub/static)
–media : Backup the pub/media folder
–db : Backup the Database.
>php bin/magento setup:backup –code –db –media
We have the option to do the backup all 3 sections together single CLI command , or individually will do the backup.
To List the Backup:
>php bin/magento info:backups:list
Save Tree !!!