windows server 2003 SSB backup script


@echo off

forfiles /p “D:\GSMC_Schedule_Backup\SSB Backup” /s /m *.bkf /d -2 /c “cmd /c del @file”

for /f “Tokens=1-4 Delims=/ ” %%i in (‘date /t’) do set dt=%%l-%%j%%k

rem for /f “tokens=1-4 delims=: ” %%i in (‘time /t’) do set tm=%%i%%j

rem set state=%dt%-%tm%

set Sdate=%dt%

Start %systemroot%\system32\ntbackup.exe backup systemstate /v:yes /r:no /rs:no /hc:off /j “System State Backup” /l:f /f “D:\GSMC_Schedule_Backup\SSB Backup\%computername%-System State-%Sdate%.bkf”

ipconfig /all >D:\GSMC_Schedule_backup\Common\IPconfig_%computername%.txt”
regedit /e “D:\GSMC_Schedule_backup\Common\Reg_%computername%.reg”
sc queryex type= service state= all >”D:\GSMC_Schedule_backup\Common\Service_%computername%.txt”

Exit

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: