Solved

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

Posted on 2008-06-25
22
702 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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
 

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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

688 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