Networker

Re: [Networker] W2K Client Problems savepnpc tmp file exists

2003-01-21 11:02:59
Subject: Re: [Networker] W2K Client Problems savepnpc tmp file exists
From: Davina Treiber <treiber AT HOTPOP DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Tue, 21 Jan 2003 11:03:06 -0500
On Tue, 21 Jan 2003 15:41:52 -0000, Wood, R A (Bob)
<WoodR AT CHEVRONTEXACO DOT COM> wrote:

>Just a quick question on this.
>
>Do you want your backups to start if the tmp file is there? The tmp file
>is there because something didn't work OK, right? Are you concerned
>about that?
Yes you should be concerned, because what it means is that the last backup
failed in some way. Perhaps the client crashed during the backup or the
group was aborted in some particularly nasty way. By now it is too late to
worry about. So yes, you do want your backup to start - even more so since
your last one probably failed.

However, it's worse than that - the backup will always start, but if the tmp
file is there it will not run the pre/post commands, and won't tell you
about it (unless you count the pointless messages in 6.1.2 and 6.1.3 which
appear even when all is well). If you were counting on a database being
stopped in order to get a consistent backup you can forget it.

>
>Now, if you want your backups to run regardless of the tmp file, make
>your precmd run a batch job that looks for the tmp file and deletes it
>before carrying on with the rest of the command.
>
>Or is it not that simple? Maybe the precmd won't start at all if the
>file is there?
You're right there. You can't count on using savepnpc functionality to fix
savepnpc, because savepnpc won't run when the tmp file is there.

>
>OK, what about the other end of the operation, the postcmd, make that a
>batch job with the last step something that can complete with return of
>0. Networker should go ahead with it's cleanup having received a
>successful completion from postcmd.
Again - no point. If it gets through as far as running the post command, the
n there is nothing to fix - it has worked. When it doesn't work it won't be
running any post commands.

The only time to fix this is before any savepnpc processes start (or inside
savepnpc). This is how savefixpnpc does it. Take a look at the script and
you will understand more. The key is that it does not blindly remove the tmp
file, it first checks the conditions in which it is incorrect for the file
to exist, and only then does it remove the tmp file.

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=