Operating System - HP-UX
1827707 Members
2854 Online
109967 Solutions
New Discussion

Re: SAM backups not running

 
steve klimesh_2
Occasional Advisor

SAM backups not running

I have backups configured through sam to run nightly and they have quit running. If I run an interactive backup, it runs fine. Below is the log for and Interactive backup:
Full backup started on MD80 : Thu Sep 20 09:49:23 EDT 2001 (Scheduled Backup)
{ fbackup -0 -u -v -g /etc/sam/br/graphPCAa00129 -I /var/sam/log/br_index.full
-c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates -f /dev/rmt/0m } 2
>&1
Full backup completed on MD80 : Thu Sep 20 09:50:30 EDT 2001 .
Exit code = 0

Has anyone seen this before? What cause a sam job not to run?

Thanks,
Steve
19 REPLIES 19
Michael Tully
Honored Contributor

Re: SAM backups not running

Hi,

SAM backups use cron to start. Check two things, that the crontab entry is still there, and the 'cron' itself is running.

# crontab -l |more (to view cron, you must be root)
To start cron
# /usr/sbin/cron && echo cron started/

HTH
-Michael
Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor

Re: SAM backups not running

Hi Steve:

Also look at /var/adm/cron/log. You should see a record of cron's activity here.

Regards!

...JRF...
Karsten Löperick
Valued Contributor

Re: SAM backups not running

Steve,

I had similar problems starting backup jobs from SAM. My workaround were simply using a remote backup device instead the local one.
You just have to add a automated backup with remote backup device whereby your machine (MD80) is the remote system name.
The result will looks like:
{ fbackup -0 -u -v -g /etc/sam/br/graphPCAa00129 -I /var/sam/log/br_index.full
-c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates -f MD80:/dev/rmt/0m } 2
>&1

Regards

Karsten
Nothing is impossible
steve klimesh_2
Occasional Advisor

Re: SAM backups not running

Michael,

Cron is running and the crontab entry is still there. Here are the entries that are now there. They have been modified to reflect Karstens suggestion:

00 23 * * 1-4 /usr/sam/lbin/br_backup MAG FULL Y MD80:/dev/rmt/0m /etc/sam/br/gr
aphLBAa15274 sklimesh@hphphp.com Y 1 N > /var/sam/SAM_br_msgs 2>&1 #sambackup
00 23 * * 6 /usr/sam/lbin/br_backup MAG PART Y MD80:/dev/rmt/0m /etc/sam/br/grap
hLBAa15274 sklimesh@hphphp.com Y 1 N > /var/sam/SAM_br_msgs 2>&1 #sambackup

James,
Here is the last entry that I have for anything in sam. I have numerous other entries in the log files:

CMD: /usr/sam/lbin/br_backup DAT FULL Y /dev/rmt/0m /etc/sam/br/graphBIAa2136
0 sklimesh@hphphp.com Y 1 N > /var/sam/SAM_br_msgs 2>&1 #sambackup
> root 14266 c Fri Aug 17 23:30:00 EDT 2001
< root 14266 c Fri Aug 17 23:30:15 EDT 2001 rc=2

Karsten,

I have made the changes that you suggested.
Mark Vollmers
Esteemed Contributor

Re: SAM backups not running

Steve,

Is there anything in the root email that says anything about the sam backups? Also, you could schedule a backup for the daytime and watch the open window to see if it does anything different (errors, etc). you might see something.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Frank Slootweg
Honored Contributor

Re: SAM backups not running

> < root 14266 c Fri Aug 17 23:30:15 EDT 2001 rc=2

As far as I know the return code (rc=) for the script is the fbackup RETURN VALUE. 2 means "any error conditions prevent the session from completing.". Also note that the session lasted only 15 seconds.

I agree with Mark that there probably is (should be) an e-mail message to user root. That message should gives some hints, including a pointer to the actual log files (/var/sam/SAM_br_msgs ?).

steve klimesh_2
Occasional Advisor

Re: SAM backups not running

Mark, Frank,

That's just it, the job its self is not even kicking off so the email is never generated.

thx,
Steve
Mark Vollmers
Esteemed Contributor

Re: SAM backups not running

Steve-

If the backup process finishes (gives an exit code and returns control), it should send an email. Do a "ps- ef |grep fbackup" and look for a process still running. We had a problem a while ago where the backup did not exit properly, and it prevented the next one from running. I ended up having to reboot to free up the device.

Mark

By the way, is there anything in the syslog as far as errors that correspond to when you started having problems with backup?
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
steve klimesh_2
Occasional Advisor

Re: SAM backups not running

Mark,

This is the only thing I get:

17043 17018 1 09:52:01 pts/ta 0:00 grep fbackup.

Nothing is the sysolgs.
Frank Slootweg
Honored Contributor

Re: SAM backups not running

The cron log says that the job *is* "kicking off", so if you see nothing else, then apparently the job is terminating prematurely.

I advise to *manually* run the *scheduled* job and see how that goes, i.e. from the command line:

/usr/sam/lbin/br_backup MAG FULL Y MD80:/dev/rmt/0m /etc/sam/br/graphLBAa15274 sklimesh@hphphp.com Y 1 N > /var/sam/SAM_br_msgs 2>&1

(all on one line)

Then inspect the logfile (/var/sam/SAM_br_msgs ) and root's mailbox.

When that works, manually schedule the job once with the batch(1) command by echo(1)-ing the whole command, quoted between single (forward) quotes, and piping the output to batch(1), i.e.

echo '.........' | batch

i.e.

echo '/usr/sam/lbin/br_backup MAG FULL Y MD80:/dev/rmt/0m /etc/sam/br/graphLBAa15274 sklimesh@hphphp.com Y 1 N > /var/sam/SAM_br_msgs 2>&1' | batch

(all on one line)

When the command works correctly with batch(1), it should also run correctly from root's crontab, because both batch(1) and crontab(1) jobs are excuted by cron(1M).

I hope this helps.
Frank Slootweg
Honored Contributor

Re: SAM backups not running

I did not notice it before, but what is the strange "sklimesh@hphphp.com" address in the crontab entry? Are you sure that is a correct and working e-mail address? If so, have you checked *that* mailbox, i.e. not just root's mailbox.
steve klimesh_2
Occasional Advisor

Re: SAM backups not running

Frank,

I changed the domain name in the email address. If I use a valid SMTP address or try send directly to root, I get the same results. Nothing!
steve klimesh_2
Occasional Advisor

Re: SAM backups not running

Frank,

I just tried:
/usr/sam/lbin/br_backup MAG PART Y MD80:/dev/rmt/0m /etc/sam/br/graphLBAa15274 root Y 1 N > /var/sam/SAM_br_msgs 2>&1

and the tape drive did not even initialize. The only way that a job appears to run is through an interactive backup in Sam.
Mark Vollmers
Esteemed Contributor

Re: SAM backups not running

Steve-

Did you try to schedule a backup for during the day (like, say, in five minutes)? Did this run? Maybe the problem is in SAM?

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Frank Slootweg
Honored Contributor

Re: SAM backups not running

Steve, did the manual try *finish*, i.e. did you get a prompt after the command?

If not, then check (from another 'terminal')for fbackup processes, etc..

If it did finish, then what was in the logfile (/var/sam/SAM_br_msgs)?
steve klimesh_2
Occasional Advisor

Re: SAM backups not running

Mark,

I tried your suggestions and it did not work. When I did another interactive backup, it worked just fine.

Steve
steve klimesh_2
Occasional Advisor

Re: SAM backups not running

Frank,
The last two entries in br_log are:

1st from the command line:
Incremental backup started on MD80 : Tue Sep 25 10:05:48 EDT 2001 (Scheduled Backup)
{ fbackup -1 -u -g /etc/sam/br/graphLBAa15274 -I /var/sam/log/br_index.incr -c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates -f MD80:/dev/rmt/0m } 2>&1

Second from within sam: no log file.
Mark Vollmers
Esteemed Contributor

Re: SAM backups not running

Steve-

That's wierd that it locks out the one but not the other. It looks to be something in SAM, but I have no idea what. You should be able to work around it by just running the fbackup command with the appropriate inclusions and exclusions from cron, set up at the time you want. Of course, it doesn't solve the problem of why you are having the problem, but it at least gets backup running.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Frank Slootweg
Honored Contributor

Re: SAM backups not running

Steve, I also asked whether the command finished and what to do if it did (not). You did not reply to that.

Also I asked what was in /var/sam/SAM_br_msgs. You told what was in br_log, i.e. a different file.

Note that the command (/usr/sam/lbin/br_backup ...) sends both its output and its standard error output ("2>&1") to the SAM_br_msgs file, so if there are any fatal errors, they are likely to be in that file.

As Mark indicates, you can also put an *fbackup* command in root's crontab. You can start with the command as it was echoed by br_backup into the br_log file, i.e.

{ fbackup -1 -u -g /etc/sam/br/graphLBAa15274 -I /var/sam/log/br_index.incr -c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates -f MD80:/dev/rmt/0m } 2>&1

I am not sure if crontab can handle the curly-brackets and since you still don't know if mail to root works correctly, you may want to change it to:

fbackup -1 -u -g /etc/sam/br/graphLBAa15274 -I /var/sam/log/br_index.incr -c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates -f MD80:/dev/rmt/0m >/tmp/fbackup.log 2>&1

and inspect the /tmp/backup.log file.