Results 1 to 5 of 5

Thread: NT Backup Command Line

  1. #1
    Join Date
    Aug 2006
    Posts
    124

    NT Backup Command Line

    I am trying to use the NT command line backup system temporarily. I just wanted to know if there was any way of omitting files and or directories from the backup thrpugh the command line? Thanks for any answers.

  2. #2
    Join Date
    Nov 2005
    Posts
    625

    Re: NT Backup Command Line

    Can you tell me why running NTBACKUP from the run line and going into the Advance mode section and selecting what you do and dont want backed up work?

  3. #3
    Join Date
    Jan 2006
    Posts
    4,221
    If that is a SBS server then the backup wizard works very well, by the way you can custom select folders? If it is failing, then 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 must be doing this. So, if you post the backup log, then we can see why its not doing it.

  4. #4
    Join Date
    Jun 2006
    Posts
    623

    Re: NT Backup Command Line

    You wont be able to put the exclusons on the command line, you have to use a created .bks file that you can create using the gui. There is an example that I used, much of it taken from the MS KB article about how to use ntbackup. 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 userful, I have 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
    ---
    The 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
    ---

  5. #5
    Join Date
    Sep 2009
    Posts
    1
    This is an old post but I am interested in the copylog.cmd and the code for backup to tape please!

Similar Threads

  1. xcopy command line together with wmplayer command line
    By Aislinn in forum Operating Systems
    Replies: 5
    Last Post: 31-03-2010, 12:13 PM
  2. How to run windows 7 backup from command line
    By Spiero in forum Windows Software
    Replies: 5
    Last Post: 30-03-2010, 02:44 PM
  3. Replies: 1
    Last Post: 18-05-2007, 01:24 AM
  4. eject tape using command-line backup commands and scheduled tasks
    By KEATON! in forum Small Business Server
    Replies: 1
    Last Post: 16-05-2007, 07:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,749,820,292.29892 seconds with 17 queries