[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference decwet::windows-nt

Title:Windows NT
Notice:See note 15.0 for HCL location
Moderator:TARKIN::LIN.com::FOLEY
Created:Thu Oct 31 1991
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6086
Total number of notes:31449

5896.0. "NT Backup Batch files already written?" by WOTVAX::HILTON (Save Water, drink beer) Thu Apr 10 1997 10:29

    Does anyone have any NT backup .bat file I could copy?
    
    I have a local NT server with a TLZ06, and I want to do incremental
    backups during the week, and then full backups every Friday night.
    
    Has somebody already written such scripts?
    
    Cheers,
    
    Greg
T.RTitleUserPersonal
Name
DateLines
5896.1GVPROD::MSTEINERThu Apr 17 1997 08:3634
Here is an example... It's the procedure we used before we started to make
backups with Networker. Basically, it does what you want (after a few updates). 
You'll need to create two entries with the AT command (one for Friday with the
parameter "normal", and one for the other days with "incremental".

Michel.

---- backup.bat ----

if "%1"=="normal" goto b_normal
if "%1"=="incremental" goto b_incremental
goto exit

:b_normal
rem
rem ** normal (full) backup **
rem
del    c:\backup\backup.old-4
rename c:\backup\backup.old-3 backup.old-4
rename c:\backup\backup.old-2 backup.old-3
rename c:\backup\backup.old-1 backup.old-2
rename c:\backup\backup.log   backup.old-1
ntbackup backup j:\ /b /v /d "\\GEO-OFFICE-2\J$ normal" /hc:on /t normal /l "C:\BACKUP\BACKUP.LOG" /e /tape:0 
goto exit

:b_incremental
rem
rem ** incremental backup **
rem
ntbackup backup j:\ /a /v /d "\\GEO-OFFICE-2\J$ incremental" /hc:on /t incremental /l "C:\BACKUP\BACKUP.LOG" /e /tape:0
goto exit

:exit