Operating System - OpenVMS
1748130 Members
3686 Online
108758 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?