Operating System - OpenVMS
1827294 Members
3000 Online
109960 Solutions
New Discussion

Re: Recording pass error

 
SOLVED
Go to solution
Alon Jacob
Frequent Advisor

Recording pass error

Lately I'm expiriencing a strange error :
When backing-up one of my disks, the backup goes well, and when it gets to the recording pass stage it goes to to the label marked as "on error goto"... for some reason I can't put my finger on.
The backup command is as follows :
$ ON ERROR THEN GOTO ERROR
...
$ BACKUP/NOREW/NOASS/IGNORE=(INTER,LABEL)/LOG/REC/MEDIA=COMPA/block=65535 -
D0:[VAXDSM...]*.* MKA500:D0.BCK/SAVE
Then after backing-up all files it goes :
%BACKUP-I-STARTRECORD, starting backup date recording pass
$ ERROR:

I tried running analyze/disk/repair on that disk but it wouldn't help.

Please advice.
36 REPLIES 36
Ian Miller.
Honored Contributor
Solution

Re: Recording pass error

at the ERROR label on yr DCL save $STATUS to another symbol then display the corresponding message e.g.

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

This may give you a clue. Are there any other commands executed after the backup and before the jump to ERROR?
____________________
Purely Personal Opinion
labadie_1
Honored Contributor

Re: Recording pass error

I would add a /verify to your backup command. The drawback is that your backup will last longer. The advantage is that you will IMMEDIATELY know if you can hope to recover from this tape or not. It is a bad surprise to know 2 years later that you do not have a valid backup. And I would remove /ignore=inter. Of course, this means no process accesses your files.
Alon Jacob
Frequent Advisor

Re: Recording pass error

Hello Ian & labadie.

Unfortunatly I cannot add the /verify to my backup command because the backup will take too long.
However I will try to use the $status veriable and promise to keep you informed.

Thank-you all very much.
James C. Nix
Frequent Advisor

Re: Recording pass error


A couple of suggestions.

First are you getting errors, search the log file for occurrences of "-F-","-W-" and "-E-".

Differentiate errors. At the top of the command file add:

$ SET NOON
$ ON SEVERE THEN GOTO SEVERE_CONTROL
$ ON ERROR THEN GOTO ERROR_CONTROL
$ ON WARNING THEN CONTINUE
....

Check for the correct syntax of the above, I'm unable to test right at the moment.

The important point is that a BACKUP/IGNORE=INTERLOCK will generate WARNING messages regarding open files which will trigger a blind ON ERROR statement.

Also the sequence of the ON ... statements is critical due to the status word bit mask.

Add a label and appropriate output for each error level to determine the cause.

I must hurry for there goes my group.... and I am their leader.
Uwe Zessin
Honored Contributor

Re: Recording pass error

Last time I checked, only the last ON clause was active. If you want to branch depending on the severity you must SET NOON before and then check the $SEVERITY symbol immediately after the BACKUP.
.
Alon Jacob
Frequent Advisor

Re: Recording pass error

Hello IAN.

I tried your idea checking the $status symbol and it's related message, and I got this : "%BACKUP-E-NOMSG, Message number 10A3800A".
Any ideas?
Uwe Zessin
Honored Contributor

Re: Recording pass error

$ set message sys$message:sysmgtmsg
$ write sys$output f$message(%x10A3800A)
%BACKUP-E-OPENIN, error opening !AS as input
$
.
labadie_1
Honored Contributor

Re: Recording pass error

get a call to a routine similar to the following, which loops in sys$message

$ MESSAGE_FLAGS = F$ENVIRONMENT("MESSAGE")
$ ! Recuperer P1 s'il n'est pas defini
$ IF P1 .EQS. "" THEN INQUIRE P1 "Numero de l'erreur VMS a chercher "
$ IF P1 .EQS. "" THEN EXIT
$ ! Par defaut, le numero est donne en hexa
$ ERROR = %X'P1'
$ ! Voir si c'est pas dans SYSMSG
$ FILE = ""
$ SET MESSAGE/DELETE
$ GOSUB MESSAGE
$ ! Mapper un par un les fichiers de SYS$MESSAGE
$LOOP:
$ FILE = F$SEARCH("SYS$MESSAGE:*.EXE")
$ IF FILE .EQS. "" THEN GOTO EDIT
$ SET MESSAGE/NOFACIL/NOSEVER/NOTEXT/NOIDENT
$ SET MESSAGE 'FILE
$ SET MESSAGE 'MESSAGE_FLAGS'
$ GOSUB MESSAGE
$ GOTO LOOP
$ ! On regarde si le message d'erreur est trouve
$MESSAGE:
$ X = F$MESSAGE(ERROR)
$ IF F$LOCATE("Message number",X) .NES. F$LENGHT(X) THEN RETURN
$ ! Editer l'erreur, son libelle et le nom du fichier de message
$EDIT:
$ IF FILE .NES. "" THEN FILE = " located in ''FILE'"
$ WRITE SYS$OUTPUT F$FAO("Error !XL (%D!SL)!AS!/!AS",ERROR,ERROR,FILE,X)
$ EXIT
$
Alon Jacob
Frequent Advisor

Re: Recording pass error

I tried all your good advices, and I came to a conclusion that one of the file's header cannot be accessed to write its backup record.
The big question is - how do I find which one?
And another interesting fact - when I backup the exact same files to a save-set on a disk it comes out fine!
Ian Miller.
Honored Contributor

Re: Recording pass error

"when I backup the exact same files to a save-set on a disk it comes out fine!"

This may be a timing issue - the backup to disk proceeds faster.
____________________
Purely Personal Opinion
Wim Van den Wyngaert
Honored Contributor

Re: Recording pass error

Did you find out why it worked on disk ?

If I remember correctly, backup exits with the heaviest error it encountered (e.g. -e- error opening because the file is deleted between you started the backup and the moment backup read the file).
The recording may go wrong because in the mean time the file no longer exists.

Wim
Wim
Alon Jacob
Frequent Advisor

Re: Recording pass error

Hello Wim.

I re-checked backing-up on disk, and it comes-out the same, which makes me think the problem is not about a file which is deleted during backup.

I tried to exclude the sub-folders in the backup command, and then it works fine.

After retrning the sub-folders (using ...) it came right back.
Antoniov.
Honored Contributor

Re: Recording pass error

Hi,
may be some file opene by read and write. If you type SH DEV/FILE see some file in folder you excluded?

Antonio Vigliotti
Antonio Maria Vigliotti
Bojan Nemec
Honored Contributor

Re: Recording pass error

Hi,

It seems that the problem file is in one of yours subdirectories.

What abbout your privileges? From the help backup:

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

Check the privileges and file protection.

Bojan
Jan van den Ende
Honored Contributor

Re: Recording pass error

Alon,

does your Backup process have READALL privilege?

From the "Guide to System Security", Appendix A. Readall privilege:
"READALL (...) allows updating of such backup-related file characteristics as the backup date".
Looks like you might be missing just that.

Jan

Don't rust yours pelled jacker to fine doll missed aches.
Bojan Nemec
Honored Contributor

Re: Recording pass error

Hi,

An idea how to find out the file:

$ DIRECTORY D0:[VAXDSM...]*.*/DATE=BACKUP

and search for the (You can use the PIPE command). If this dont give you the result (There was a sucessful backup record in the past) you can try this:

$ DIRECTORY D0:[VAXDSM...]*.* /OUTPUT=BEFORE.TXT
$ DATE=F$TIME()
$ BACKUP ....
$ DIRECTORY D0:[VAXDSM...]*.* /SINCE='DATE' -
/BACKUP /OUTPUT=AFTER.TXT
$ DIFFERENCES BEFORE.TXT AFTER.TXT


Maybe /COLUMNS=1 qualifier to the DIRECTORY will be more appropriate.

Bojan
Alon Jacob
Frequent Advisor

Re: Recording pass error

Hello Bojan.

It looks like your 2 ideas put me on the right track. I found some files (using dir/date=backup) that are owned by SYSTEM account, when the backup is done using a different account that might not have the SYSPRV privilege.

I'll change it's privileges and let you know tomorrow. I guess you have a perfect "10" coming your way...
Jan van den Ende
Honored Contributor

Re: Recording pass error


Alon,

please re-check the info on the READALL privilege!!

SYSPRV might be both too much & not enough!

SYSPRV gives MUCH more rights than needed by Backup (eg, modifying authorisations), but, if you have any file protections that have NO system:W allowed, than SYSPRV is NOT enough. Also, files NOT opened share can NOT be modified with SYSPRV, but READALL will do the trick.
READALL is designed specifically for THIS type of functions (during RESTORE it also allows ANY needed WRITE actions regardless of protection).


Jan
Don't rust yours pelled jacker to fine doll missed aches.
Bojan Nemec
Honored Contributor

Re: Recording pass error

Hi,

I agree with Jan 100% !!!
My first previous post was only checking if you have problems with privileges and the line:
------------
To use the /RECORD qualifier you must either own the file or
have SYSPRV privileges.
------------

was literaly copied from the $ HELP BACKUP /RECORD.

So use READALL privilege or adjust file protection! The READALL privilege is the best solution for operators doing backup.

Bojan
Alon Jacob
Frequent Advisor

Re: Recording pass error

I accept both.
Thank-you all for your help, and I'll let you know.

Alon.
Alon Jacob
Frequent Advisor

Re: Recording pass error

Bojan and Jan (and everyone answering my question).

I just checked the backup, and the READALL priv doesn't do it.
I guess that's coming from some file's prot is nothing to WORLD (which is the only match for the user that runs the backup) and I'm not allowed to change that prot.
Therefore I guess that I have to give that user the SYSPRV priv.

I'd like to thank you all for your help, I realy learned a lot.

Alon.
Bojan Nemec
Honored Contributor

Re: Recording pass error

Hi,

I make some tests and READALL privilege works fine! The backup /record works on files with protection (S,O,G,W) and an ACL like this:

(IDENTIFIER=*,OPTIONS=PROTECTED,ACCESS=NONE)

The backup user has TMPMBX,NETMBX and READALL privileges.

By the way, which is the version of OpenVMS? Can you send us a DIRECTORY/FULL of the file which is not backed up?

Bojan
Alon Jacob
Frequent Advisor

Re: Recording pass error

Hi.

I came accross this problem at OpenVMS 7.2-1 and 7.3 (two seperate servers, not a cluster).
At the 7.2-1 the READALL didn't help, but SYSPRV did.
From the 7.3 server the data you wanted is :
SEND_BACKUP_LOG.LOG;437 File ID: (9248,2237,0)
Size: 3/35 Owner: [VAXDSM]
Created: 4-AUG-2004 04:20:05.33
Revised: 4-AUG-2004 04:20:07.61 (1)
Expires:
Backup:
Effective:
Recording:
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 35, Extend: 0, Global buffer count: 0
No version limit
Record format: VFC, 2 byte header, maximum 0 bytes, longest 91 bytes
Record attributes: Print file carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:, World:
Access Cntrl List: (IDENTIFIER=DSM$MANAGER_VAXDSM,ACCESS=READ+WRITE+EXECUTE+
DELETE)
Client attributes: None
Bojan Nemec
Honored Contributor

Re: Recording pass error

Hi,

I think I get the problem!
Corect me if I am in false.

You are doing the backup in batch. The command is something like this:

$ SUBMIT ... /LOG=D0:[VAXDSM.??]SEND_BACKUP_LOG.LOG

So the log file is open during the backup. In the log file probably you get a line like this:
%BACKUP-E-OPENIN, error opening D0:[VAXDSM.??]SEND_BACKUP_LOG.LOG;437 as input
-SYSTEM-W-ACCONFLICT, file access conflict

Try to move the log file to another place, which is not in the backedup directories.


Bojan