Errore Amanda "/bin/tar returned 1"

From RVM Wiki
Jump to navigation Jump to search

In etch può darsi che un backup sia indicato come FAILED nel job reporta con un errore del tipo:

...
FAILURE AND STRANGE DUMP SUMMARY:
          galserver  /  lev 0  FAILED [/bin/tar returned 1]
...

In effetti il backup è andato a buon fine, ma se si nota, ci sono dei files non trovati, che fanno uscire tar con un valore di 1:

...
? gtar: ./var/spool/squid/00/50/000050DD: Warning: Cannot stat: No such file or directory
        | Total bytes written: 51155752960 (48GiB, 1.8MiB/s)
        sendbackup: error [/bin/tar returned 1]

La versione in etch di Amanda non è comptaibile con

tar --version
tar (GNU tar) 1.16

Occorre creare un wrapper per tar:

cd /bin
sudo mv tar tar.real
cat | sudo tee /bin/tar > /dev/null <<'EOFile'
#!/bin/bash
/bin/tar.real "$@"
RC=$?
if [ $RC -eq 1 ]; then RC=0 ; fi
exit $RC                 
EOFile
sudo chmod +x tar