Link to home
Start Free TrialLog in
Avatar of ghSERVICES
ghSERVICES

asked on

Can a NTBACKUP task be created in VISTA's Task Scheduler?

I've placed the appropriate Windows XP NTBACKUP files in a specific folder called NTBACKUP within the Program Files folder in an VISTA PC.  These files are: Ntbackup.exe, Ntmsapi.dll, Vssapi.dll, Ntbackup.chm, and Ntbackup.hlp.

I've created a  backup job and have initiated it manually.  No problem, the backkup job works just fine.

I would like to know if the backup job can be setup in the VISTA Task Scheduler?   I've attempted this task in the VISTA Task Scheduler but nothing happens.
I've attempted a command line initiation of the NTBACKUP application but the application just flickers on the screen and then disappears.  

This is the comnand line code:  "C:\Program Files\NTBACKUP\ntbackup.exe" NTBACKUP.EXE backup "@C:\NTBACKUP\Windows NT\NTBackup\data\testbackup" /n "TestBackup.bkf created 6/25/2008 at 12:21 PM" /d "Set created 6/25/2008 at 12:21 PM" /n "TestBackup.bkf created 6/25/2008 at 12:21 PM" /v:no /r:no /rs:no /hc:off /m normal /j "testbackup1" /l:s /f "G:\GH11ntbackup\TestBackup.bkf"
 
This code works just fine when the NTBACKUP.exe is initiated manually.  I just need to get it to work within the VISTA Task Scheduler.

VISTA;s Backup applicaton cannot select specific files and folders for backup - I need this ability in my backup jobs.
Avatar of ghSERVICES
ghSERVICES

ASKER

My appology.  This is the actual code used:  "C:\Program Files\NTBACKUP\ntbackup.exe" NTBACKUP.EXE backup "@C:\Users\Gary\AppData\Local\Microsoft\Windows
NT\NTBackup\data\testbackup" /n "TestBackup.bkf created 6/25/2008 at 12:21 PM" /d "Set created 6/25/2008 at 12:21 PM" /n "TestBackup.bkf created 6/25/2008 at 12:21 PM" /v:no /r:no /rs:no /hc:off /m normal /j "testbackup1" /l:s /f "G:\GH11ntbackup\TestBackup.bkf"
I don't have a definite yes or no answer, but how did you create the file "@C:\Users\Gary\AppData\Local\Microsoft\Windows
NT\NTBackup\data\testbackup"? This file (named testbackup.bks) must be created using the NTBackup GUI. If you modify this is in any way then the backup job will fail.

Other than that it could be a permission problem. What error code do you see in the Task Scheduler log?

I haven't tried scheduling NTBackup on Vista myself but am interested in knowing whether it will work or not.

Put the code in a batchfile and add the batchfile to the scheduled tasks.

To see what happens you could add "cmd /k" in front of your code in the batchfile. (it opens the commandpromt and keeps it opened)

This should work, Good luck!
r-k::  I am able to run the NTBACKUP GUI in VISTA manually.  This means I was able to schedule a backup within the NTBACKUP GUI.  The scheduled task, within the NTBACKUP GUI will not interface with the VISTA Task Scheduler.  However, the scheduled task, within the NTBACKUP GUI, did provide access to the 'RUN' command code presented to you as part of my question earlier.
minvis:   I modified the batch file code that I am initiating through the VISTA Task Scheduler to mut be: cmd /k "C:\Program Files\NTBACKUP\ntbackup.exe".  When I do this the NTBACKUP GUI appears and stays in focus.  

However when I place the rest of the code in the batch file like this: cmd /k "C:\Program Files\NTBACKUP\ntbackup.exe" NTBACKUP.EXE backup  "@C:\Windows\Tasks\testbackup" /n "TestBackup.bkf creat
ed 6/25/2008 at 2:33 PM" /d "Set created 6/25/2008 at 2:33 PM" /n "TestBackup.bkf created 6/25/2008 at 2:33 PM" /v:no /r:no /rs:no /hc:off /m normal /
j "testbackup" /l:s /f "G:\GH11ntbackup\TestBackup.bkf"  

I receive this message: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

I receive the same message when I remove the NTBACKUP. EXE backup out of the code like this:
C:\Users\Gary\Documents>cmd /k "C:\Program Files\NTBACKUP\ntbackup.exe" "@C:\Win
dows\Tasks\testbackup" /n "TestBackup.bkf created 6/25/2008 at 2:33 PM" /d "Set created 6/25/2008 at 2:33 PM" /n "TestBackup.bkf created 6/25/2008 at 2:33 PM" /v:no /r:no /rs:no /hc:off /m normal  /j "testbackup" /l:s /f "G:\GH11ntbackup\TestBackup.bkf"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
minvis:  By the way, I can only run the batch file from the command line or the Start->Run.  When I try to run the batch file from the VISTA Task Scheduler nothing happens even though the status is 'Running'.
Just try someting.

Change the content of the batchfile to:
---------------
C:
cd\
cd prog*
cd ntbackup
ntbackup.exe" "@C:\Windows\Tasks\testbackup" /n "TestBackup.bkf created 6/25/2008 at 2:33 M" /d "Set created 6/25/2008 at 2:33 PM" /n "TestBackup.bkf created 6/25/2008 at 2:33 M" /v:no /r:no /rs:no /hc:off /m normal  /j "testbackup" /l:s /f "G:\GH11ntbackup\TestBackup.bkf"
pause
------

Or edit the scheduled task to run as your useraccount in stead of the system account.
minvis:  The VISTA Task Scheduler task is running under my user account - I didn't see a place to change it from the system account to my user account.

When I modified the batch file to your specifications it would not initiate from the VISTA Task Scheduler.  However I was able to initate it from Start->Run...

c:\Users\Gary\Documents>ntbackup
c:\Users\Gary\Documents>C:
c:\Users\Gary\Documents>cd\
c:\>cd prog*
c:\Program Files>cd ntbackup
c:\Program Files\NTbackup>ntbackup.exe "@C:\Windows\Tasks\testbackup" /n "TestBa
ckup.bkf created 6/25/2008 at 2:33 PM" /d "Set created 6/25/2008 at 2:33 PM" /n
"TestBackup.bkf created 6/25/2008 at 2:33 PM" /v:no /r:no /rs:no /hc:off /m norm
al  /j "testbackup" /l:s /f "G:\GH11ntbackup\TestBackup.bkf"
c:\Program Files\NTbackup>pause
Press any key to continue . . .

As a result of the batch file running the NTBACKUP GUI initated to the point of "Looking for backup devices" and then the NTBACKUP GUI would close down leaving the command window open.

When I removed the code after the "@..." sign and ran the batch file from Start->Run the NTBACKUP GUI remained visible.
I attempted to run this variation of the batch file from the VISTA Task Scheduler - No response even though the status was "Running"

I would appear that VISTA cannot initate the code after the "@..." sign.  It would also appear that the NTBACKUP GUI failes to recognize the execution of the code after the "@..." sign.

Great ideas - I ready to try any others you may have.
minvis: I'm leaving for a while to call on a client - Will be back later.  I'm enthusiastic that we may be very close to resolving this issue.  Please continue thinking of a resolution as will I.  Thanks
A short recap:

If you run an NTbackup job from the commandline in vista there is no problem, but when jou start the job from a scheduled task it won't run.....?
minvis: That is correct.  When I start NTBACKUP.exe from the command line or from Start->RUN I can manually perform a backkup.  I cannot run a scheduled backup job from the NTBACKUP. GUI but I can run a manually initated backup job.
Is UAC turned on? Maybe you need an administartor command prompt.

Right click the batch file > campatibillity tab > always run as administrator.

If you double click the batch file....wil it run?
minvis: The UAC is turned off.  I've changed the permissions for Security and Shariing to Everyone on all files and folders that directly affect the functionality of the NTBACKUP.exe application.  When the batch file is run it will run to the point of starting to count the number of bytes to backlup but then disappears from the screen.  I've run the batch file "As an Administrator" the same thing occurs - My user name has administrator permissions so the 'As an Administrator' checkbox in the compatibility tab is grayed out - Any way I run the batch file it turns out the same way as noted before.
minvis:  There are some command line commands for wbadmin that may be able to resolve my backup issue - I'm going to work on this angle.  Can still use assistance if you are so inclined.  If not - Thanks for your assistance.
minvis:  The wbadmin is as limited as the GUI interface within VISTA.  I have been have been able to perform VISTA Task Scheduled batch files using ROBOCOPY coding with each batch file (one scheduled for each batch file for each different folder in my root directory that requires backing up)  Cannot seem to run more than one ROBOCOPY command per batch file.  This works even if it is a 1:1 copy of each file.  At least it is 'backing-up' files to a safe remote (mapped) hard drive for safe keeping.  I don't think Microsoft has any intention of modifying the wbadmin.exe capabilities within VISTA.
@ghSERVICES:
First of all...it's very strange! Everything should work when you do what you did.

Another thing: why not use a third party backup tool. My favourite simple backup program is BACKER (http://www.cordes-dev.com/) not very expensive but very powerfull.

minvis - I've tried your suggestions on a couple of different VISTA PC's in the same office and one at my office - same results - Doesn't work.  Sorry, I can't stay on this constantly as I've got other obligations to my business.  If there are no other suggestions I'll end this question.
ASKER CERTIFIED SOLUTION
Avatar of minvis
minvis
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
minvis - I'm going to close this question - No solution reached but I'll award the points anyway for your effort.   Thanks
The suggestions really did not work on the VISTA PC's available to me.
My pleasure. Any time.