Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Small Business Server
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , ,

Sponsored Links



NT Backup Command Line

Small Business Server


Reply
 
Thread Tools Search this Thread
  #1  
Old 09-04-2008
vcapone
 
Posts: n/a
NT Backup Command Line

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?
Reply With Quote
  #2  
Old 09-04-2008
Russ \(SBITS.Biz\)
 
Posts: n/a
Re: NT Backup Command Line

Is there any reason why running NTBACKUP from the run line and going into
the "Advance mode"
section and selecting what you do and don't want backed up work?
Reply With Quote
  #3  
Old 09-04-2008
vcapone
 
Posts: n/a
Re: NT Backup Command Line

I tried that initially. I backup to a network drive which in turn copies the
..bkf file to an external Hard drive which gets rotated out and taken offsite.
For some reason, the backup kept failing. I made a batch file using the
command line option and it works fine. Full BU on Sunday and differential
during the week.
Reply With Quote
  #4  
Old 09-04-2008
Russ \(SBITS.Biz\)
 
Posts: n/a
Re: NT Backup Command Line

If this a SBS server the Backup Wizard works Very Nicely BTW and you can
custom select folders?
NTBACKUP on Steroids you can purchase BACKUP ASSIST

If it's failing are you backing up to a Mapped drive that is not there?
or using \\server\path

The backup wizard running NTBACKUP from the run line should be doing this

Perhaps if you post the Backup Log we can see why it's not doing it.
Because if the wizard or NTBackup script created is not doing it.
the other is likely to fail also
Reply With Quote
  #5  
Old 09-04-2008
Bill Sanderson
 
Posts: n/a
Re: NT Backup Command Line

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.
Reply With Quote
  #6  
Old 10-04-2008
SuperGumby [SBS MVP]
 
Posts: n/a
Re: NT Backup Command Line

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
Reply With Quote
  #7  
Old 10-04-2008
Bill Sanderson
 
Posts: n/a
This file is descended from a server which did not have Exchange
installed, and I never learned that trick. (and, in fact, that file is
still on a server which does not have Exchange installed...)

Where I have Exchange, I'm also using SBS backup, and not anxious to change.
Reply With Quote
  #8  
Old 18-09-2009
Member
 
Join Date: Sep 2009
Posts: 1
Re: NT Backup Command Line

This is an old post but I am interested in the copylog.cmd and the code for backup to tape please!
Reply With Quote
  #9  
Old 19-09-2009
Russ Grover [SBS-MVP]
 
Posts: n/a
Re: NT Backup Command Line

You can either use a NNTP News Reader (Example Outlook Express)
And set it up with:
NewsServer: msnews.microsoft.com
newsgroup: microsoft.public.windows.server.sbs
or By Clicking Below
news://msnews.microsoft.com/microsof...ows.server.sbs

If you wish a "WEB" Based interface with NO Ad's you can go directly to this
forum with.
http://www.microsoft.com/communities...dows.server.sb
s&cat=en_US_e18fea59-512f-421e-b9f3-3e1f643123f2&lang=en&cr=US
It has the feature to notify you on a reply also.

To Search for issues in the past the best way is to Google them.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Small Business Server


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "NT Backup Command Line"
Thread Thread Starter Forum Replies Last Post
Need help with Opera backup list and winrar command line shortcut Adesh1 Windows Software 5 06-05-2011 01:01 AM
xcopy command line together with wmplayer command line Aislinn Operating Systems 5 31-03-2010 01:13 PM
How to run windows 7 backup from command line Spiero Windows Software 5 30-03-2010 03:44 PM
autorun.inf - shell\..\command with command line parameter doesn'twork kakii Windows XP Support 1 18-05-2007 02:24 AM
eject tape using command-line backup commands and scheduled tasks Neil Hoskins Small Business Server 4 17-05-2007 08:14 PM


All times are GMT +5.5. The time now is 05:16 AM.