Re: dos batch programmer help!!



<assafm@xxxxxxxxx> wrote in message
news:1153437306.270687.79460@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In the company i work, we backup the server data to few external HD.
Every few days we change the hd and after two weeks, we get back to the
first hd and so on... the problem is that the secretary who responsible
to switch the hd always make mistakes and put the recent one. we want
to add a section to the batch file that check the volume serial number
of the external hd and make sure it is the one for backuping this week.
for example: this week i am using HD #1, and his serial number is
xxxx-xxxx.
if the secretary put a different number, it should write, "HD doesnt
match" or something...

is anyone know how to do this?

I solved this problem, but with a tape backup system, some years ago during a
consulting job.

However, I did it by writing a small program which left a flag file behind
which the batch file tested. Like this:

cls
echo Please install the backup tape
pause
testtape
if exist testtape.ok goto goodtape
if exist testtape.bad goto badtape
cls
echo ERROR ERROR ERROR
echo Problem with tape test procedure, contact administrator
pause
goto end

:badtape
cls
echo WRONG TAPE
echo You have the wrong tape installed
pause
goto end

:goodtape
: Backup procedure here

:end

- Bill


.



Relevant Pages

  • Robocopy fails sporadically
    ... if errorlevel 16 echo FATAL ERROR on BACKUP of %~n0's DATA>> ... if errorlevel 8 echo FAILED COPIES on BACKUP of %~n0's DATA>> ...
    (microsoft.public.windows.server.general)
  • Re: dos batch programmer help!!
    ... REM Set up your two serial numbers here and ensure dir C:\TEMP\ exists ... if errorlevel 1 goto otherdisk ... echo Wrong diskin H: -- swap it to allow backup to continue! ...
    (comp.os.msdos.programmer)
  • [SLE] Bat files in Linux
    ... In Windows I do this with a bat file that looks like the sample below. ... ECHO Backup Menu ... ECHO A. Flash Drive Backup J: ... IF /I '%Choice%'=='A' GOTO ItemA ...
    (SuSE)
  • RE: NT Backup inconsistent medium
    ... I would configure the backup with NTBackup and set a schedule from there. ... | directory's to a tape with NT backup it works fine. ... | @ECHO Off ... | REM Script gebaseerd op NT Backup ...
    (microsoft.public.windows.server.sbs)
  • Verify tape backup - Am I doing it correctly?
    ... then tries to verify the backup. ... echo "rewinding tape" ... echo "retensioning tape" ...
    (RedHat)