This is most excellent.
Thanks very much!
Kurt
On Wed, Feb 20, 2008 at 8:36 PM, Ken Cornetet <[EMAIL PROTECTED]> wrote:
> Here's a script I use. It requires grep, blat and recode.
>
> You will have to create your BKS file (it must be Unicode).
>
> Watch for line wrap.
>
> rem *****************************************************************
> rem *
> rem * Perform fullback to whatever tape is in the drive and email
> rem * report
> rem *
> rem * Ken Cornetet - 06/10/2002
> rem *
> rem * Revision History
> rem *
> rem * When Who What
> rem * ---------------------------------------------------------------
> rem * 06/10/2002 Ken Cornetet Original Issue
> rem * 06/24/2002 Ken Cornetet Added RSM command per Q267574
> rem *
> rem *
> rem * Requires external programs blat, grep, and recode
> rem *
> rem *****************************************************************
>
> set [EMAIL PROTECTED]
> set SMTP={Name of your SMTP relay host here}
> set NAME=FULL BACKUP %DATE% %TIME%
> set LOGS=%USERPROFILE%\Local Settings\Application Data\Microsoft\Windows
> NT\NTBackup\data
>
> c:
> cd \backup
>
> rem Delete any extraneous log files
> del "%LOGS%\backup*.log"
>
> rem ************************************************************
> rem * Have removable storage management look at tape in drive
> rem * (See Q267574 for details)
> rem ************************************************************
>
> start /wait rsm refresh /lf"BNCHMARK DLT1 SCSI Sequential Device"
> c:\bin\sleep 30
>
> rem ************************************************************
> rem * Do Backup
> rem ************************************************************
>
> start /wait ntbackup backup @c:\backup\everything.bks /M normal /J
> "%NAME%" /P DLT /N "%NAME%" /l:s /HC:on /UM /D "%NAME%"
>
> rem ************************************************************
> rem * find newest (should be only) log file
> rem ************************************************************
>
> dir /s /b /o-d "%LOGS%\backup*.log" >c:\backup\backup.tmp
> set /P FILE= <c:\backup\backup.tmp
>
> rem ************************************************************
> rem * Make ASCII version of log file
> rem ************************************************************
>
> c:\bin\recode -f unicode..us <"%FILE%" >log.txt
>
>
> rem ************************************************************
> rem * Set subject for email
> rem ************************************************************
>
> set SUBJ=Backup ran OK
> grep -v "Error: You do not have permission" log.txt > log1.txt
>
> findstr /i error: log1.txt
> if not ERRORLEVEL 1 set SUBJ=Backup ran - FAILED
>
> rem ************************************************************
> rem * Send email
> rem ************************************************************
>
> c:\bin\blat log.txt -t %RECIPIENT% -subject "%SUBJ%" -server %SMTP% -f
> %RECIPIENT%
>
> rem ************************************************************
> rem * Move log file to our directory
> rem ************************************************************
>
> move /Y "%FILE%" c:\backup
>
>
>
>
>
>
> -----Original Message-----
> From: Christopher Boggs [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 20, 2008 3:16 PM
> To: NT System Admin Issues
>
>
> Subject: Re: ntbackup scripts
>
> Rename it with a .txt extension :)
> ----------------------------
> Christopher Boggs
> Security System Administrator
> Miltec Corporation
>
> office.256-428-1370
> mobile.256-468-0922
> fax.256-428-1461
>
> Painstakingly sent to you from my Blackberry...
>
> ----- Original Message -----
> From: Ben Scott <[EMAIL PROTECTED]>
> To: NT System Admin Issues <[email protected]>
> Sent: Wed Feb 20 13:12:58 2008
> Subject: Re: ntbackup scripts
>
> On Wed, Feb 20, 2008 at 7:17 AM, Kurt Buff <[EMAIL PROTECTED]> wrote:
> > Anyone have any ntbackup scripts they'd care to share?
>
> NTBACKUP is, in my experience, idiosyncratic and poorly-documented.
> Reporting/logging is limited, and selective restores are somewhat
> cumbersome. All that said, one you know what works and what doesn't,
> it is very servicable. And, of course, you already paid for it, so it
> doesn't cost extra. It use it on some servers here at %DAYJOB%.
>
> The biggest limitation I find is that anything other than "unmanaged
> media mode" (i.e., /UM switch) doesn't appear to work in any sane or
> reliable fashion. There's some kind of drain bamage involved which
> I've never figured out.
>
> I've got a set of batch files that automate things reasonably well
> for our purposes. Notable features include hands-off operation, tape
> name reporting and preservation, and the ability to email the log
> file. The design is basically put a tape in and it will run the
> backup to it that night. If that tape is ejected the next morning, it
> worked. Media rotation scheduling has to be handled manually, but I
> use a basic daily/weekly/monthly scheme that makes that a no-brainer.
> KISS.
>
> I attempted to attach the scripts to this message, but Gmail refuses
> executable files. I guess I should have seen that coming. Anyone got
> some place I can upload 'em to?
>
> -- Ben
>
> ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~
> ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~
>
> ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~
> ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~
>
> ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~
> ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~
>
~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~
~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~