Magento2 备份命令执行报错 Backup functionality is disabled

备份数据库的时候报错:
www-data@demo-php-fpm:/var/www/html$bin/magento setup:backup –db
Enabling maintenance mode
DB backup is starting…
Backup functionality is disabled
Disabling maintenance mode

 

解决办法:
www-data@demo-php-fpm:/var/www/html$ bin/magento config:set system/backup/functionality_enabled 1
Value was saved.

 

再运行备份命令:
www-data@demo-php-fpm:/var/www/html$ bin/magento setup:backup –db
Enabling maintenance mode
DB backup is starting…
DB backup filename: 1666089174_db.sql
DB backup path: /var/www/html/var/backups/1666089174_db.sql
[SUCCESS]:DB backup completed successfully.
Disabling maintenance mode

 

备份网站文件命令:
bin/magento setup:backup –code
bin/magento setup:backup –media

 

 

相关文章