Operating System - HP-UX
1819866 Members
2757 Online
109607 Solutions
New Discussion юеВ

tar -cvf in cronjob returns error 5

 
Kurt Rahm
New Member

tar -cvf in cronjob returns error 5

I have a nightly cronjob that does our backup. It uses "tar -cvf" to put to tape and is returning an error code 5. I trap the error number, but can't get a description. I've search the web and can't find a description anywhere. I've done the following :
$ cd /usr/lib/nls/
$ cd C
$ dumpmsg tar.cat
$set 1
1 Tar: cannot create temporary file (%s)\n
2 Invalid blocksize. (Max %d)\n
3 tar: %c: unknown option\n
4 tar: blocksize %d too big, can't get memory\n
5 Can only create standard output archives\n
6 tar: cannot open %s\n

but "can only create standard output archives" is meaningless to me.

Can anybody give me a source for what the "tar" error codes mean?

Thanks
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: tar -cvf in cronjob returns error 5

Check write protection on the tape.

Depending on the script, temp space may be required on the /var filesystem.

If the tape driver has been corrupted then one of the following commands may bring it back.

insf -e

insf -C tape

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kent Ostby
Honored Contributor

Re: tar -cvf in cronjob returns error 5

error 5 in Hp-ux is I/O error.

So something is wrong with the tape or the tape drive or you are trying to read from the wrong device file.

What happens if you run the script manually.

As with many cases involving cron, you probably also want to check to make sure you have full paths defined.

Best regards,

Oz
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kurt Rahm
New Member

Re: tar -cvf in cronjob returns error 5

After writing to the tape, I do a "tar -tvf" to a file and do a validation of the files with what should be put to the tape. It produces a list of "files that should be on tape but are not" and "files on tape that are no longer on the system". This validation routine appears to be working fine. It appears that the "tar" command is writing what I expect to tape.