in my crontab file (SCO5) but I want to be absolutely sure that the backup job finishes successfully. I know that whenever cron cannot execute a command sends an e-mail to root with the error code and/or an explanation of the problem.
What I want is a way to display a message on screen so that I (or anyone else, in case I'm missing) can see it in the morning and check the backup status (completed successfully/not completed successfully).
Unfortunately, even though there is no mail about tar on root, I've the suspicion that the tar command is not executed. (To tell, I changed the time from 2:30, to 8:00 and nothing happened.)
Depending on your user base (are all of you privelaged-type users, or do you have a lot of "regular" users on your system?), you could do a few things.
Number one, I'd (personally want to) place your commands into a script - just execute the script from cron. That way it'll be much easier to handle the jobs efficiently, and to include a little error handling as well. You could write anything in the script you wanted, including displaying a warning in the MOTD upon backup failure, mailing out to certain users, creating a log file, etc, etc, etc... Besides, if you run the script from cron, as opposed to the command itself, it will be much easier to update and change in the future.
Now, if you want that much extra debugging, at the top of the script, right under "#!/bin/sh", insert a line like this one: set -x. If you do this, it also might be a good idea to redirect the entire script output to a different file:
30 2 * * * /path/to/my/fake/script.sh >> /var/tmp/tar-debug.log 2>&1
Please do not use the script above in a production environment, because I just made it up right now - instead hopefully you can grab some ideas out of it and build one that suits your needs - just keep in mind that the logs (both the tar -v output and the set -x output) will help you immensly!
Hope that helps!
Last edited by LivinFree; 09-12-2001 at 08:06 AM..
Also, if a command in cron generates any
stderr output, normally this will be emailed
to the owner of the cron job. This mail can be
forwarded anywhere (provided your network allows).
Originally posted by pappous On the other hand, is there any backup program for unix to propose? (Something like ARCServe or BackupEXEC for Windows and Novell)
Yes, there is.. I am running SCO R. 5 and I have SCO ARCserve 2.2 installed and running.. check
Hi,
These are the text file I have
//input1.txt//
cd dir1/dir2/pg1.txt
cd dir3/dir4/pg2.txt
cd dir88/dir5/pg4.txt
cd dir7/dir6/pg5.txt
cd dir8/dir9/pg7.txt
And each text file has some text.
Now I have to write a shell script which reads input1.txt and changes the directory as shown... (1 Reply)
I have downloaded the Putty SSH configuration. I have entered my Host name as illinois.engr.sjsu.edu and i am trying to save that. But i am unable to save.
Also i opened the session and entered my log in name
But it says using keyboard interactive authentication.I am not able to get into $
... (2 Replies)
Following is d code snipet
#!/bin/ksh
retVal=`sqlplus -s user/passwd\@oracle_sid <<EOF
SET SERVEROUTPUT ON SIZE 100000
DECLARE
STATUS_VALUE VARCHAR2(1);
BEGIN
SELECT temp1 INTO STATUS_VALUE FROM sai;
DBMS_OUTPUT.PUT_LINE(STATUS_VALUE);
END;
/
exit;
EOF`
echo "Return Value... (2 Replies)
Following is d code snipet
#!/bin/ksh
retVal=`sqlplus -s user/passwd\@oracle_sid <<EOF
SET SERVEROUTPUT ON SIZE 100000
DECLARE
STATUS_VALUE VARCHAR2(1);
BEGIN
SELECT temp1 INTO STATUS_VALUE FROM sai;
DBMS_OUTPUT.PUT_LINE(STATUS_VALUE);
END;
/
exit;
EOF`
echo "Return Value... (4 Replies)
Hi everyone,
I would like to know how to compile and run lex programs on solaris 10.
the conventional way is
$ lex <name.l>
$ cc lex.yy.c -ll
$ ./a.out
but while trying to execute the 2nd command :i get a reference saying that the command is old or that main is not supported...
Hence... (1 Reply)
Hi,
I am creating a pipe in a directory $HOME/pipes. The pipename should be
L${PROGNAME}. Whenever i embed these lines in shell script, i get an error
mkfifo: No such file or directory.
I am creating a pipe with the key word
mkfifo $HOME/pipes/L${PROGNAME}.
Please help me how to get... (5 Replies)