我发现计划任务中的网站备份功能的目录排除功能不生效,具体来说就是不排除。
我检查了面板下面的脚本backup.py
(1)我发现最后类似执行了一个如下的语句:
tar -zcvf Web_xxxx.com_20200130_214357.tar.gz xxxx.com --exclude='data'
而这条语句我直接在SSH里面执行会提示:
tar: The following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly.
tar: --exclude ‘data’ has no effect
也就是说排除选项失效。
(2)所以我重新排布了命令参数的顺序如下:
tar --exclude=data -zcvf Web_xxxx_20200130_214357.tar.gz xxxx.com
这条命令就正确执行了打包和排除data目录。也就是说,对于我系统cenots8上的tar版本, --exclude选项必须提到最前面
但是面板的脚本backup.py执行的是(1)中的语句,所以导致排除功能失效,
请问我是等待版本升级修正backup.py脚本么?
或者我自己去修改backup.py?
或者有其他解决方法?
|
|