tar: /path/to/destination/jp: 文件为存档;没有倾倒
tar: /path/to/destination/jp: file is the archive; not dumped
我正在开发一个简单的脚本来进行简单的备份。
当我尝试 运行 这个语法时:
nameofscript.pl <what_to_backup> <where_to_place_the_backup>
backupsystem /var/log /home/osboxes/Desktop
我收到这个错误:
tar: /home/osboxes/Desktop/ConteudosServer/backupsystem/jp: file is the archive; not dumped
这是重要的代码部分:
else{
`tar -cfjp $ARGV[1] $ARGV[0]`;
}
其余代码运行良好。
PS: 代码正在根据日期决定是完全备份还是增量备份。
tar
命令不需要 -
(破折号)作为命令选项。
只需使用
tar cfjp $ARGV[1] $ARGV[0]
我正在开发一个简单的脚本来进行简单的备份。 当我尝试 运行 这个语法时:
nameofscript.pl <what_to_backup> <where_to_place_the_backup>
backupsystem /var/log /home/osboxes/Desktop
我收到这个错误:
tar: /home/osboxes/Desktop/ConteudosServer/backupsystem/jp: file is the archive; not dumped
这是重要的代码部分:
else{
`tar -cfjp $ARGV[1] $ARGV[0]`;
}
其余代码运行良好。
PS: 代码正在根据日期决定是完全备份还是增量备份。
tar
命令不需要 -
(破折号)作为命令选项。
只需使用
tar cfjp $ARGV[1] $ARGV[0]