Description

Unable to compress var log (">file archive compress source /var/log/* destination /var/tmp/varLog.tar") getting following error message:

 

"error: /usr/bin/tar was not successful" after executing ">file archive compress source /var/log/* destination /var/tmp/varLog.tar"

Symptoms

  • Unable to compress logs due to following error message: "error: /usr/bin/tar was not successful"
  • It has been attempted basic troubleshooting in shell and within /var/tmp and error is still persistent.

Solution

In order to fix this error you have to follow KB33844 [juniper.net] ([MX] "error: /usr/bin/tar was not successful" error message when performing commit on re0) 

AND

KB70822 [juniper.net] (Compressing varlogs shows following error message: varlog /var/log/messages: file changed as we read it 1682357702 != 1682357700 /usr/bin/tar: Error exit delayed. error: /usr/bin/tar was not successful)


if issue is persistent proceed to clear any unnecessary files within /var/tmp. (>file list /var/tmp ) & delete the unnecessary files with (>file delete /var/tmp/fileName) like old junos packages for installation.

Modification History

2024-05-08 : Article Created

Related Information

KB33844 [juniper.net]
https://juniper.lightning.force.com/lightning/r/Knowledge__kav/ka03c0000009UNwAAM/view

KB70822 [juniper.net]
https://juniper.lightning.force.com/lightning/r/Knowledge__kav/ka0Dp000000qTBDIA2/view ​​​​​​​