Results 1 to 1 of 1
Well, I'm not experienced in BASH/PERL programming, sometimes I make some changes in the backup script. It compresses the data on a tape drive, check is everything done ok and ...
- 02-19-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 1
(perl/bash) tar czvf|openssl enc and exit_code status
Well, I'm not experienced in BASH/PERL programming, sometimes I make some changes in the backup script. It compresses the data on a tape drive, check is everything done ok and sends a report via email. As it was earlier:
and thenCode:$exit_code=system("$tar czvf $tapedevice $oracle 1>$tar_status 2>$tar_errors");checks wheater all is ok or not, click link to see all the codeCode:if ((stat($tar_errors))[7] && $exit_code)
Perl pastebin - collaborative debugging tool
Lately I added encryption for some more security
copy works, encryption too, but the report always says it's ok, even when it's notCode:$exit_code=system("tar czvpf $tapedevice $oracle $samba $config $src $webdav | openssl enc -aes-256-cbc -salt -pass file:/tmp/.key 1>$tar_status2 2>$tar_errors2");
Does anyone know how to check exit code so it would work with tar | openssl.
This is the full script (the part doing compression and encryption):
Perl pastebin - collaborative debugging tool


Reply With Quote