Solved

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

Posted on 2008-06-25
22
686 Views
Last Modified: 2010-04-21
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.
0
Comment
Question by:ghSERVICES
  • 13
  • 8
22 Comments
 

Author Comment

by:ghSERVICES
ID: 21871881
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"
0
 
LVL 32

Expert Comment

by:r-k
ID: 21872401
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.

0
 
LVL 5

Expert Comment

by:minvis
ID: 21873230
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!
0
 

Author Comment

by:ghSERVICES
ID: 21873480
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.
0
 

Author Comment

by:ghSERVICES
ID: 21873637
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.
0
 

Author Comment

by:ghSERVICES
ID: 21873819
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'.
0
 
LVL 5

Expert Comment

by:minvis
ID: 21873966
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
------

0
 
LVL 5

Expert Comment

by:minvis
ID: 21873999
Or edit the scheduled task to run as your useraccount in stead of the system account.
0
 

Author Comment

by:ghSERVICES
ID: 21874469
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.
0
 

Author Comment

by:ghSERVICES
ID: 21874521
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
0
 
LVL 5

Expert Comment

by:minvis
ID: 21875041
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.....?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:ghSERVICES
ID: 21878828
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.
0
 
LVL 5

Expert Comment

by:minvis
ID: 21881707
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?
0
 

Author Comment

by:ghSERVICES
ID: 21904870
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.
0
 

Author Comment

by:ghSERVICES
ID: 21916403
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.
0
 

Author Comment

by:ghSERVICES
ID: 21917927
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.
0
 
LVL 5

Expert Comment

by:minvis
ID: 21923098
@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.

0
 

Author Comment

by:ghSERVICES
ID: 21972758
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.
0
 
LVL 5

Accepted Solution

by:
minvis earned 250 total points
ID: 21973025
The only suggestion i have got is Backer....a very nice tool for making backups at file level...but as you stated if robocopy works for you, just use robocopy.
0
 

Author Comment

by:ghSERVICES
ID: 21974829
minvis - I'm going to close this question - No solution reached but I'll award the points anyway for your effort.   Thanks
0
 

Author Closing Comment

by:ghSERVICES
ID: 31470858
The suggestions really did not work on the VISTA PC's available to me.
0
 
LVL 5

Expert Comment

by:minvis
ID: 21975301
My pleasure. Any time.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now