Ntbackup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • markstaylor
    Indigo Rose Customer
    • Oct 2003
    • 296

    Ntbackup

    I have a Unix server on a Windows 2000 Server Domain. I have a mapped drive to the Unix Server (that has a partion used by our windows users.)

    I can't get the NTBackup program to use this mapped drive ( says it's not a valid drive) but all others it will. It has something to do with the fact it's a Unix OS. ANYWAY

    I want to run NTBackup thru AMS5 using the command string it produces. The backup will be made locally and have AMS move the file to the Unix Server Weekly.

    I have accomplished this in scripts (VBS) but I want to spruce it up a bit with AMS and maybe add some extra features.

    My first problem is the NTBackup command string has arguments that have quotation marks around them.

    example:
    Code:
    C:\WINNT\system32\NTBACKUP.EXE backup "@C:\Documents and Settings\mtaylor\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Test.bks" /n "Media created 1/21/2005 at 1:04 PM" /d "Set created 1/21/2005 at 1:05 PM" /v:no /r:no /rs:no /hc:off /m normal /j "Test" /l:s /f "S:\mark.bkf"
    I thought I had to add the backslash before each of the quotes like follows.

    Code:
    File.Run("C:\\WINNT\\system32\\NTBACKUP.EXE","backup \"@C:\Documents and Settings\mtaylor\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Test.bks\" /n \"Media created 1/21/2005 at 1:04 PM\" /d \"Set created 1/21/2005 at 1:05 PM\" /v:no /r:no /rs:no /hc:off /m normal /j \"Test\" /l:s /f \"S:\mark.bkf\"");
    But it isn't working for me. Any ideas on this?
    SELECT * FROM Users WHERE IQ > 0;
    o rows Returned
  • Worm
    Indigo Rose Customer
    • Jul 2002
    • 3971

    #2
    You still need to double up the backslashes (\) in your arguments too, other than that it looks fine to me.
    Code:
    File.Run("C:\\WINNT\\system32\\NTBACKUP.EXE","backup \"@C:\\Documents and Settings\\mtaylor\\Local Settings\\Application Data\\Microsoft\Windows NT\\NTBackup\\data\\Test.bks\\" /n \"Media created 1/21/2005 at 1:04 PM\" /d \"Set created 1/21/2005 at 1:05 PM\" /v:no /r:no /rs:no /hc:off /m normal /j \"Test\" /l:s /f \"S:\mark.bkf\"");

    Comment

    • markstaylor
      Indigo Rose Customer
      • Oct 2003
      • 296

      #3
      Yep your right, Worked with the doubles. For some reason I thought I wouldn't have to do that in the argument. I was wrong

      Thanks Worm
      SELECT * FROM Users WHERE IQ > 0;
      o rows Returned

      Comment

      • Worm
        Indigo Rose Customer
        • Jul 2002
        • 3971

        #4
        You probably realize it now, but when the scripting engine sees a \ it considers it an escape character, so to display or use a \ in a variable, you still need to double up.

        Comment

        Working...
        X