1.

Solve : Query regarding my backup script ...?

Answer»

Hello all,

Has been some time again since I was last on the forum so I hope everyone is fairing well.

I have a backup script (+ associated file) that works well - no issues ... except on Tuesday mornings.

I can't understand why, but returns a "***WARNING*** - Only COMPLETED 4 of the 3 backups attempted." in the log - has me completely miffed.

Could someone spare a few minutes, TAKE a peek and make any suggestions.

Cheers,
Cameron


[attachment deleted by admin]I have never seen some of your techniques, but if you say it works, I guess that's true.

Quote

for /f %%i in (%TempFile%) do call %0 CheckNumOfBackups %%i

Quote
:CheckNumOfBackups
if not "%2"=="%NumOfBackups%" call %0 FoundWarnings Only completed %2 of the %NumOfBackups% backups attempted.
if "%2"=="%NumOfBackups%" set MailBody=%MailBody% - %2 of %NumOfBackups% completed ok.
goto :EOF

This appears to be the code where the message is issued. Does not a call to %0 create a recursion problem? TRY turning echo on to trace what value %%i has.

I couldn't find any code specific to Tuesday, only Sunday and Monday. The message is not logical (Only completed 4 of the 3 backups attempted.) so I would try debugging files left over from previous run that shouldn't exist for this run.

Quote
set Date=%%l-%%k-%%j

Suggest not using reserved words or command NAMES for your variables. Results can be unpredictable.

Hi SIDEWINDER,

Many thanks for the reply & taking the time to peruse the script.
I'll take all onboard your comments and have a further look after the New Year starts.

In the mean time - have Merry Christmas and a happy New Year.

Cheers,
Cameron


Discussion

No Comment Found