Operating System - OpenVMS
1828456 Members
4069 Online
109978 Solutions
New Discussion

Re: Error on BACKUP recording pass

 
SOLVED
Go to solution
Chaim Budnick
Regular Advisor

Error on BACKUP recording pass

OpenVMS V7.3

The daily backup is done via a batch job. The command procedure contains the following:

$ ON ERROR THEN GOTO ERROR

The log file contains the following:

%BACKUP-I-STARTRECORD, starting backup date recording pass
$ ERROR:

This indicates that an error was generated during the recording pass.

Following is the BACKUP command being used:

$ BACKUP/NOREW/NOASS/IGNORE=(INTER,LABEL)/LOG/REC/MEDIA=COMPA/BLOCK=65535 -
/EXCLUDE=[VAXDSM.JOURNAL]*.* -
D0:[VAXDSM...]*.* MKC500:D0.BCK/SAVE

The user executing the job has the following privs:

Authorized Privileges:
CMKRNL LOG_IO NETMBX OPER PHY_IO SYSPRV
TMPMBX
Default Privileges:
CMKRNL LOG_IO NETMBX OPER PHY_IO SYSPRV
TMPMBX

Can someone shed some light why this is occurrig?

The backup, nevertheless, appears to be complete, but we are bothered by the job aborting and not completing successfully.

Thanks in advance !

36 REPLIES 36
Lokesh_2
Esteemed Contributor
Solution

Re: Error on BACKUP recording pass

Hi Chaim,

Can you post more details about your backup command procedure here ?

Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

Lokesh,

What exactly would you like yo know?

Thanks,

Chaim
Lokesh_2
Esteemed Contributor

Re: Error on BACKUP recording pass

Hi Chaim,

Please post your backup command procedure here (in notepad) if that is not very big. You can also post your log file here.

Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

$ SET NOON
$ SET VER
$! 07-MAR-2004 - Dismount command change to keep the tape in the drive. Alon.
$ set proc/priv=all
$ ON ERROR THEN GOTO ERROR
$
$ DAY = F$CVTIME("TODAY",,"WEEKDAY")
$! IF DAY .EQS. "Monday" THEN GOTO LOGOUT
$! IF DAY .EQS. "Wednesday" THEN GOTO LOGOUT
$! IF DAY .EQS. "Thursday" THEN GOTO LOGOUT
$ IF DAY .EQS. "Saturday" THEN GOTO LOGOUT
$
$! 13-jun-2004 Delaying was canceled due to Sami's request. Alon.
$! WAIT 01:00:00
$ COPY SYS$STARTUP:AMITAL.COM D0:[VAXDSM]*.*
$ PU/KEEP=3 D0:[VAXDSM...]*.*/exclude=a.prn
$ PU/KEEP=14 D0:[VAXDSM]A.PRN
$ SH TIME
$
$!!!!! MAIL REPORT FOR NESS HELP-DESK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ curr_time = f$extract(0,20,f$time())
$ today = f$cvtime("today",,"weekday")
$ if TODAY .eqs. "Monday"
$ then
$ open/write/error=AFTR_MSG1 bcktime d0:[vaxdsm.ness]backup_time.o
ut
$ else
$ open/append/error=AFTR_MSG1 bcktime d0:[vaxdsm.ness]backup_time.
out
$ endif
$ write bcktime ""
$ write bcktime "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
$ write bcktime "Backup started at ''curr_time'"
$ close bcktime
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ AFTR_MSG1:
$
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]STOP.IN ^VOLINH
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]STOP1.IN ^VOLINH
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]STOP2.IN ^VOLINH
$
$! changing daylight time to winter/summer time. Alon.
$!====================================================
$ if f$search("d0:[vaxdsm.ness]daylight_time.com") .nes. ""
$ then
$ @d0:[vaxdsm.ness]daylight_time.com
$ endif
$
$ ALLOC MKC500:
$ day = f$cvtime(f$time(),,"day")
$ month = f$cvtime(f$time(),,"month")
$ year = f$extract(2,2,f$cvtime(f$time(),,"year"))
$ bckdate = day+month+year
$ init/media=compact MKC500: 'bckdate'
$!
$! 27-DEC-2001 label will be written to Ness log file for reports. Alon Jacob
$ open/append/error=AFTR_LABEL bcklbl d0:[vaxdsm.ness]backup_time.out
$ write bcklbl "Tape label initiated to ''bckdate'"
$ close bcklbl
$ AFTR_LABEL:
$
$! 24-APR-2003. Backup will create a seperate save-set for each disk. Alon.
$! 13-jun-2004. Journal files will be saved to a seperate save-set to enable
$! earlier opening of DSM. Alon.
$!
$ BACKUP/NOREW/NOASS/IGNORE=(INTER,LABEL)/LOG/REC/MEDIA=COMPA/BLOCK=65535 -
D1:[VAXDSM...]*.* MKC500:D1.BCK/SAVE
$ BACKUP/NOREW/NOASS/IGNORE=(INTER,LABEL)/LOG/REC/MEDIA=COMPA/BLOCK=65535 -
D0:[VAXDSM.JOURNAL]*.* MKC500:JRNL.BCK/SAVE
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]START.IN ^VOLINH
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]START1.IN ^VOLINH
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]START2.IN ^VOLINH
$ BACKUP/NOREW/NOASS/IGNORE=(INTER,LABEL)/LOG/REC/MEDIA=COMPA/BLOCK=65535 -
/EXCLUDE=[VAXDSM.JOURNAL]*.* -
D0:[VAXDSM...]*.* MKC500:D0.BCK/SAVE
$
$ DISM/NOUNLOAD MKC500:
$ DEALL MKC500:
$
$!!!!! MAIL REPORT FOR NESS HELP-DESK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ curr_time = f$extract(0,20,f$time())
$ open/append/error=AFTR_MSG2 bcktime d0:[vaxdsm.ness]backup_time.out
$ write bcktime "Backup finished at ''curr_time'"
$ close bcktime
$
$ AFTR_MSG2:
$! SUBMIT D0:[VAXDSM]MAILGIB
$ SUBM/LOG=D0:[VAXDSM.NESS]SEND_BACKUP_LOG.LOG D0:[VAXDSM.NESS]SEND_BACKUP_LOG.C
OM
$ LO
$
$ ERROR:
$ERROR:
$ Added the following lines to get a more meaningful error 27-09-2004 Cb.
$ ss = $STATUS
$ WRITE SYS$OUTPUT "Error ''F$MESSAGE(ss)'"
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]START.IN ^VOLINH
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]START1.IN ^VOLINH
$ DSM/ENV=VAXDSM/UCI=MGR/INPUT=D0:[VAXDSM]START2.IN ^VOLINH
$! SUBMIT D0:[VAXDSM]MAILGIB
$
$!!!!! MAIL REPORT FOR NESS HELP-DESK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ curr_time = f$extract(0,20,f$time())
$ open/append/error=AFTR_MSG3 bcktime d0:[vaxdsm.ness]backup_time.out
$ write bcktime "Backup aborted at ''curr_time' ! ! !"
$ close bcktime
$
$ AFTR_MSG3:
$ SUBM/LOG=D0:[VAXDSM.NESS]SEND_BACKUP_LOG.LOG D0:[VAXDSM.NESS]SEND_BACKUP_LOG.C
OM
$
$ DISM/NOUNLOAD MKC500:
$ DEALL MKC500:
$
$ EXIT
$
$ LOGOUT:
$ SUBM/LOG=D0:[VAXDSM.NESS]SEND_BACKUP_LOG.LOG D0:[VAXDSM.NESS]SEND_BACKUP_LOG.C
OM
$ LO
Lokesh_2
Esteemed Contributor

Re: Error on BACKUP recording pass

Just had a quick look at the com file. What are you getting in your log file for the following command of your com file:

$ ss = $STATUS
$ WRITE SYS$OUTPUT "Error ''F$MESSAGE(ss)'"


Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
Wim Van den Wyngaert
Honored Contributor

Re: Error on BACKUP recording pass

You have to post the .log. Backup returns the highest error it encountered as the return status. So, there must be a message like -e- or -f- before your -i-.

Wim
Wim
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

Lokesh,

I just added that this afternoon, so I won't get any output for this until tomorrow morning.

Thanks,

Chaim
Jan van den Ende
Honored Contributor

Re: Error on BACKUP recording pass

Chaim,

I am not claiming that I found THE error, but

Authorized Privileges:
CMKRNL LOG_IO NETMBX OPER PHY_IO SYSPRV
TMPMBX
Default Privileges:
CMKRNL LOG_IO NETMBX OPER PHY_IO SYSPRV
TMPMBX


You are missing "READALL";
and if this account is used ONLY for BACKUP,
then CMKR,LOG_,OPER,PHY_, and SYSP are overkill.
READALL should perhaps carry a better name of BACKUPPER or somthing like that.
In your case specifically, if you have on your disk only ONE file without write permission for SYSTEM, then /RECORD will encounter an error trying to write the backup recording date. The description of the READALL privilege mentions just this specific reason for using READALL. (sorry, at home now, no pointer to the doc, but it is (at least) in the Guide to system security, in the chapter that discusses each individual privilege).


hth,

Jan
Don't rust yours pelled jacker to fine doll missed aches.
Lokesh_2
Esteemed Contributor

Re: Error on BACKUP recording pass

Hi Jan,

From VMS online help:

BACKUP

/RECORD

Command Qualifier

Records the current date and time in the BACKUP date field of
each file header record once a file is successfully saved or
copied. If you do not specify the /RECORD qualifier, BACKUP does
not change the BACKUP date field of each processed file. Observe
the following restrictions:

o The /RECORD qualifier is valid only with Files-11 Structure
Level 2 volumes.

o To use the /RECORD qualifier you must either own the file or
have SYSPRV privileges.

o You cannot use the /RECORD qualifier with the /DELETE


o You can use the /RECORD qualifier in BACKUP save or copy
operations only.

Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
Jan van den Ende
Honored Contributor

Re: Error on BACKUP recording pass

Lokesh,

this same issue came up a few months ago.

Please read:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=634019

It appears the HELP and the Sucurity Guide DO NOT have the same info, but the info from the Security Guide is how BACKUP behaves.


Jan
Don't rust yours pelled jacker to fine doll missed aches.
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

I did not have the opportunity to add READALL to the VAXDSM account, but even without this, the backup completed without any errors last evening.

I have now added READALL.

If the error reoccurs, then I willl post the log file which will hopefully also include the error code.

In the meantime, thanks to everyone who posted replies!!
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

The error has RETURNED.

The account running does have READALL as well.

Following is the output from the error routine:

WRITE SYS$OUTPUT "Error ''F$MESSAGE(%x10A3800A)'"
Error %BACKUP-E-OPENIN, error opening !AS as input

Of course the !AS would contain the actual file name that only BACKUP actually knows.

What is frustrating is that I don't see any actual error in the log file from BACKUP. Perhaps if I knew what actual file is bothering BACKUP that this would help me to resolve this problem.

There is an "ON ERROR..." at the beginning of the command procedure. All I see is
%BACKUP-I-STARTRECORD, starting backup date recording pass, and then immediately the label for the error routine.

From this I concluded that the error was generated within this recording pass.

How can I "force" that BACKUP display the actual error from the BACKUP utility which hopefully would include the !AS substitution, and which would display the file name.

Chaim
Wim Van den Wyngaert
Honored Contributor

Re: Error on BACKUP recording pass

Could it be that 1 or more of the files that had to be recorded as "backuped" no longer exists ?

Wim
Wim
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

That is what I assume as well, but without the actual file name, I have not even the slightest clue to attempt to resolve the problem. If I had the "missing" file name, perhaps this would assist me in understanding why this file is missing.

Chaim
Ian Miller.
Honored Contributor

Re: Error on BACKUP recording pass

Read the wise words of the Wizard on the perils of /IGNORE=INTERLOCK
http://h71000.www7.hp.com/wizard/wiz_2467.html

/IGNORE=LABEL is not really a good idea either - it can lead to overwriting the wrong tape.

Just to check - in the backup job error log there is no mention of the filename?
____________________
Purely Personal Opinion
Bojan Nemec
Honored Contributor

Re: Error on BACKUP recording pass

Chaim,

The %BACKUP-E-OPENIN is reported when backup cant read an input file for reading. When it cant write the backup date the error is %BACKUP-I-WRITEBACK, error writing backup date for file ID .

The OPENIN error is probably caused by a deleted file (by another process) during the backup operation. Backup first collects file headers for backedup files then do the backup of them. If the file is deleted between the collection phase and backing up this error is reported.

The error %BACKUP-E-OPENIN, error opening !AS as input is reported by yours line:
$ WRITE SYS$OUTPUT "Error ''F$MESSAGE(ss)'"

which knows nothing abbout the file. This error is reported after the whole backup is finished. But you must have the error (reported by backup, with the file name) in the log file. The error must be between the log messages. Please do a SEARCH logfile "%BACKUP-E" to find it out.


Bojan
Wim Van den Wyngaert
Honored Contributor

Re: Error on BACKUP recording pass

I tested it and Bojan is right.

Wim
Wim
Karl Rohwedder
Honored Contributor

Re: Error on BACKUP recording pass

As long as error messages are not disabled (using SET MESSAGE...), BACKUP should report
the files having problems with.
You included SET NOON at the top of the procedure, so any ON ... condition is not checked.
Check the message status with
$ write sys$output F$env("message") in the
backup procedure.
Wim Van den Wyngaert
Honored Contributor

Re: Error on BACKUP recording pass

... and the filename is displayed. When it during the recording phase, the directory is shown but not the filename (only the id).

Wim
Wim
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

I didn't see the trees from all the forest!

OK! I see the filename now and I see that it belongs to a FAX application, and in all likelihood the FAX application deletes the files on the fly! SO it is very possible that the file existed when the BACKUP first begins its list pass but has been deleted when it gets down to the nitty gritty of actually writing the file to tape.

Chaim
Bojan Nemec
Honored Contributor

Re: Error on BACKUP recording pass

Another thing,

Abbout SET NOON and the ON ERROR. Errors in backup are reported at the end of the backup operation. This is good because backup does backup of the files which are after the error.

When you have many backups in the same procedure it is a good practce to set the SET NOON. If you want a special report (like in yours procedure) do something like this:

$ ON ERROR THEN GOTO E1
$ BACKUP ...
$ GOTO B2
$E1:
$ ! do report
$B2:
$ ON ERROR THEN GOTO E2
$ BACKUP ...
$ GOTO B3
$E2:
$ ! do report
$B3:

etc..

Because is better to have something than nothing.

Bojan
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

BTW, my assumption that the error was occurring during the RECORDING pass was entirely incorrect!

Chaim
Ian Miller.
Honored Contributor

Re: Error on BACKUP recording pass

Assumption is the mother of all foul ups :-)
____________________
Purely Personal Opinion
Chaim Budnick
Regular Advisor

Re: Error on BACKUP recording pass

Now that I have basically diagnosed the problem, how do I solve it?

The problem is that these files are being constantly created/deleted.

Is there a way to cause these files to be NOBACKUP upon creation? I set the directory to NOBACKUP, but the files being created within are not inheriting this property.

Chaim