Re: NT Backup Command Line
- From: "SuperGumby [SBS MVP]" <not@xxxxxxxxxxx>
- Date: Thu, 10 Apr 2008 12:22:28 +1000
BLAT is unnecessary. Just drop the properly formatted message into the
Exchange 'pickup' dir.
The file exclusions can be done in the BKS file used.
eg.
C:\
C:\RECYCLER\ /Exclude
C:\scripts\ /Exclude
C:\spoolerlogs\ /Exclude
C:\sysinternals\ /Exclude
C:\temp\ /Exclude
C:\WUTemp\ /Exclude
C:\WINDOWS\Temp\ /Exclude
C:\WINDOWS\SoftwareDistribution\ /Exclude
SystemState
"Bill Sanderson" <bill_sanderson@xxxxxxxxxxxxxxxxx> wrote in message
news:78FEEE64-53F4-43E3-BF96-A8E7E2C0B156@xxxxxxxxxxxxxxxx
You can't put the exclusions on the command line--you have to use a
created .bks file which you can create using the gui.
Here's a recent example I used--much of it taken from a Microsoft KB
article about how to use ntbackup:
I'm showing you a real-world example in daily use--don't worry about the
excess stuff if you find it confusing--focus on the ntbackup line itself.
This is backing up to an external USB connected drive G, rather than
tape--the ntbackup line would be somewhat different with switches for
tape--I can dig up the tape version if you would find it useful--I've got
it from the previous Windows 2000 server.
---
@echo off
for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set
dt=%%i-%%j-%%k-%%l
for /f "Tokens=1" %%i in ('time /t') do set tm=-%%i
set tm=%tm::=-%
set dtt=%dt%%tm%
c:\windows\system32\ntbackup.exe backup systemstate "@C:\Documents and
Settings\Administrator.journal\Local Settings\Application
Data\Microsoft\Windows NT\NTBackup\data\daily.bks" /F
"G:\%computername%-%dtt%.bkf" /D "daily %dtt%" /V:yes /M normal /J "daily
%dtt%" /L:s /FU
call c:\tools\copylog.cmd
exit
---
copylog copies the log file to a folder on the desktop, and also uses BLAT
to mail it to a couple of folks:
---
del c:\tools\*.log
xcopy "c:\documents and settings\administrator.journal\local
settings\application data\microsoft\windows nt\ntbackup\data\*.log"
c:\tools
dir c:\tools\*.log /b /od >c:\tools\ordered.txt
echo %date% >c:\tools\copylogx.txt
echo %time% >>c:\tools\copylogx.txt
type c:\tools\copylog.txt >>c:\tools\copylogx.txt
rem c:\tools\uptime /s /a >>c:\tools\copylogx.txt
for /F "skip=9" %%1 IN (ordered.txt) do rename %%1 current.log
rem current.log is Unicode, so won't go in a text message.
type c:\tools\current.log >c:\tools\%dtt%.log
rem above converts current.log from unicode to ascii.
xcopy %dtt%.log "c:\documents and
settings\administrator.journal\desktop\backup logs\" <f.txt
c:\tools\blat.exe c:\tools\copylogx.txt -t [email addresses go here] -s
"%dtt% backup output" -attacht c:\tools\%dtt%.log
del ordered.txt
del copylogx.txt
---
This works--it's been running for some months now on a Windows Server 2003
machine. I'm sure some of it could be done more elegantly, but I haven't
tinkered with it in a long time. It was "translated" from Windows 2000 to
Windows Server 2003 a few months back when they got a new server.
"vcapone" <vcapone@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:52D2AFED-B1CB-40F4-ABE1-821E92938AE3@xxxxxxxxxxxxxxxx
Hi, I am using the NT command line backup system temporarily. I wanted
to
know if there was any way of omitting files and/or directories from the
backup through the command line?
Thank You,
Vinny
.
- Follow-Ups:
- Re: NT Backup Command Line
- From: Bill Sanderson
- Re: NT Backup Command Line
- References:
- NT Backup Command Line
- From: vcapone
- Re: NT Backup Command Line
- From: Bill Sanderson
- NT Backup Command Line
- Prev by Date: How to Set Up And Use Public Address Book
- Next by Date: Re: Remote Connection Issue/Question
- Previous by thread: Re: NT Backup Command Line
- Next by thread: Re: NT Backup Command Line
- Index(es):
Relevant Pages
|
Loading