宝塔备份用阿里云oss,执行计划任务时出现如下错误解决办法 :
文件上传出现错误: [Errno 2] No such file or directory: '/www/server/panel/plugin/alioss/settings.json' ========================================================================================== |-错误:文件pay/database/mysql/pay/pay_2024-03-19_22-09-03_mysql_data.sql.gz上传出现错误:[Errno 2] No such file or directory: '/www/server/panel/plugin/alioss/settings.json'
解决办法:
原因是在这个/www/server/panel/plugin/alioss文件目录 缺少一个文件名:settings.json
我们创建一个settings.json文件后再尝试,
接着又出现错误日志:
文件上传出现错误: Expecting value: line 1 column 1 (char 0) ========================================================================================== |-错误:文件pay/database/mysql/pay/pay_2024-03-19_22-11-03_mysql_data.sql.gz上传出现错误:Expecting value: line 1 column 1 (char 0)
解决json解析报错:Expecting value: line 1 column 1 (char 0)
我们在刚才 创建的文件settings.json打开写入下面代码 即可 解决:
{“upload_speed”: 1000}
|-正在上传到阿里云OSS,请稍候... 1000 |-已成功上传到阿里云OSS |-数据库已备份到:/www/backup/database/mysql/crontab_backup/pay/pay_2024-03-19_22-12-43_mysql_data.sql.gz |-本地备份已保留。 |-保留最新的备份数:3 份 ========================================================================================== ☆备份完成[2024-03-19 22:12:44]
完美解决!!