NT Backup Failing

G

Guest

I created a backup with Microsoft's backup utility. It works when I am logged
in. When I have it scheduled, it doesn't work and fails with a status of
"Last Result 0x1f".

I reference a NAS device via a mapped network drive like:
Z:\MonBackUps\Backup.bkf

I am using WindowsXP machines with SP2.

I stayed logged in via "Switch User" and the backup ran successfully;
however, these are multiuser machines that are used frequently. The idea was
to back them up at night when no one was using them. The switch user or
lock-workstation idea really isn't too great for that.

I did some additional testing by writing a batch file and running it (while
logged in).

@echo off
echo %date% %time% Start of task > c:\test.log
dir Z:\MonBackups 1>>c:\test.log
echo %date% %time% 1>Z:\MonBackups
echo User=%UserName%, Path=%path% >> c:\test.log
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log
echo %date% %time% End of task >> c:\test.log

If I run this line of the batch file from cmd.exe, it works fine.
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log 2>>c:\test.err

If I run the same line from inside of a batch file, I get the message
"Access is denied."

If I look in the event viewer for applications, I see the following Error:
EventID 8017.
NTBackup error: 'Command Line Problem: A valid backup operation was not
specified on the command line.'

Since I ran the wizard to setup the entire backup, and it works when logged
in, I doubt the command line of the NTBackup has an issue.

On the Microsoft site, I found this:
When you back up your computer's hard disk by using Backup (NTBackup.exe),
Backup may stop responding or may crash, and the following event is logged:
Event ID: 8017
Source: Ntbackup
Ntbackup error: The saved selection file "(path\FileName.bks)" cannot be
found.

CAUSE
This problem may occur if one or more folders that have been scheduled for
backup are deleted or moved.
Back to the top

RESOLUTION
Microsoft Windows XP Hotfix Information
A supported hotfix is now available from Microsoft, but it is only intended
to correct the problem that is described in this article. Only apply it to
systems that are experiencing this specific problem. This hotfix may receive
additional testing. Therefore, if you are not severely affected by this
problem, Microsoft recommends that you wait for the next Windows XP service
pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support
Services to obtain the hotfix. For a complete list of Microsoft Product
Support Services phone numbers and information about support costs, visit the
following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support

Seems like two different issues to me:
1. "Access is denied." to ntbackup - most likely the problem
2. 8017 "(path\FileName.bks)" cannot be found.

Anyone know how I can get this hotfix?

Anyone have any ideas for this?
 
P

Pegasus \(MVP\)

bobneedshelp said:
I created a backup with Microsoft's backup utility. It works when I am logged
in. When I have it scheduled, it doesn't work and fails with a status of
"Last Result 0x1f".

I reference a NAS device via a mapped network drive like:
Z:\MonBackUps\Backup.bkf

I am using WindowsXP machines with SP2.

I stayed logged in via "Switch User" and the backup ran successfully;
however, these are multiuser machines that are used frequently. The idea was
to back them up at night when no one was using them. The switch user or
lock-workstation idea really isn't too great for that.

I did some additional testing by writing a batch file and running it (while
logged in).

@echo off
echo %date% %time% Start of task > c:\test.log
dir Z:\MonBackups 1>>c:\test.log
echo %date% %time% 1>Z:\MonBackups
echo User=%UserName%, Path=%path% >> c:\test.log
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log
echo %date% %time% End of task >> c:\test.log

If I run this line of the batch file from cmd.exe, it works fine.
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log 2>>c:\test.err

If I run the same line from inside of a batch file, I get the message
"Access is denied."

If I look in the event viewer for applications, I see the following Error:
EventID 8017.
NTBackup error: 'Command Line Problem: A valid backup operation was not
specified on the command line.'

Since I ran the wizard to setup the entire backup, and it works when logged
in, I doubt the command line of the NTBackup has an issue.

On the Microsoft site, I found this:
When you back up your computer's hard disk by using Backup (NTBackup.exe),
Backup may stop responding or may crash, and the following event is logged:
Event ID: 8017
Source: Ntbackup
Ntbackup error: The saved selection file "(path\FileName.bks)" cannot be
found.

CAUSE
This problem may occur if one or more folders that have been scheduled for
backup are deleted or moved.
Back to the top

RESOLUTION
Microsoft Windows XP Hotfix Information
A supported hotfix is now available from Microsoft, but it is only intended
to correct the problem that is described in this article. Only apply it to
systems that are experiencing this specific problem. This hotfix may receive
additional testing. Therefore, if you are not severely affected by this
problem, Microsoft recommends that you wait for the next Windows XP service
pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support
Services to obtain the hotfix. For a complete list of Microsoft Product
Support Services phone numbers and information about support costs, visit the
following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support

Seems like two different issues to me:
1. "Access is denied." to ntbackup - most likely the problem
2. 8017 "(path\FileName.bks)" cannot be found.

Anyone know how I can get this hotfix?

Anyone have any ideas for this?

This batch file looks deceptively as if it came out of my kitchen,
except that you chose to do without capturing any error output . . .

You say that the file looks like this:
@echo off
echo %date% %time% Start of task > c:\test.log
dir Z:\MonBackups 1>>c:\test.log
echo %date% %time% 1>Z:\MonBackups
echo User=%UserName%, Path=%path% >> c:\test.log
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log
echo %date% %time% End of task >> c:\test.log

and that it reports "Access denied" when running this line:
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log

How do you know that the error is caused by this line?
I doubt it very much! I suspect the error occurs when you
access a networked drive. To confirm this conclusively,
you must expand your batch file like so:

@echo off
echo %date% %time% Start of task > c:\test.log
echo %date% %time% Start of task > c:\test.err
echo User=%UserName%, Path=%path% >> c:\test.log

echo Command=dir Z:\MonBackups >>c:\test.err
dir Z:\MonBackups 1>>c:\test.log 2>>c:\test.err

echo Command=echo %date% %time% >>c:\test.err
echo %date% %time% 1>Z:\MonBackups 2>>c:\test.err

echo Command=%systemroot%\system32\ntbackup.exe >>c:\test.err
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log 2>>c:\test.err
echo %date% %time% End of task >> c:\test.log

Now examine both log files once more so that you know
***which*** batch file command generates this error.

You also report this error: "NTBackup error: 'Command Line
Problem: A valid backup operation was not specified on the
command line.' You chose not to quote the exact command
line you use, hence it's anyone's guess what could be wrong.
 
G

Guest

Originally, I did get this batch file from somewhere on the Internet. If it
was from you, thanks for providing it. I can change it as you suggest and
try the test again.

I know that the error comes from:
%systemroot%\system32\ntbackup.exe
because I commented out the other lines in the batch file and just ran this
line to find out which line caused issues.

If I just run this line in the batch file, I get the error "Access is denied."

I have a nightly job scheduled (using the backup wizard and scheduler) that
puts the following event information into the application event log.

Event ID: 8017
Source: Ntbackup
Ntbackup error: The saved selection file "(path\FileName.bks)" cannot be
found.

I found the information about this Event ID on Microsoft's support web site.
The .bks file is in a user's Application Data directory I believe by
default. The file is there. I also believe all directories selected by the
wizard is there as well.
 
P

Pegasus \(MVP\)

The .bks file can reside anywhere. In your case it seems
that it resides in a location that is inaccessible to the account
you use to run the backup job. There are two obvious ways
to fix this:
a) Move the file to a location that is accessible to the account
used for the backup job, or
b) Use an account for the backup job that has appropriate
access rights to the .bks file.
 
G

Guest

I scheduled and ran the following batch file when I was logged out.

@echo off
echo %date% %time% Start of task > c:\test.log
dir Z:\MonBackUps 1>>c:\test.log 2>>c:\test.err
echo %date% %time% 1>Z:\MonBackUps 2>>c:\test.err
echo User=%UserName%, Path=%path% >> c:\test.log
%systemroot%\system32\ntbackup.exe /.. /.. 1>>c:\test.log 2>>c:\test.err
echo %date% %time% End of task >> c:\test.log

In the test.err file I had:
The system cannot find the path specified.

In the test.log file I had:
Wed 01/25/2006 19:08:00.29 Start of task
User=Bob,
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;"C:\Program
Files\Symantec\Norton Ghost 2003\";C:\Program Files\QuickTime\QTSystem\
Wed 01/25/2006 19:08:11.42 End of task

I ran the same batch file when I was logged in.

In the cmd window I get a message that says: "Access is denied".

In the test.err file I had nothing (no errors).

In the test.log file I had:
Wed 01/25/2006 19:15:29.54 Start of task
Volume in drive Z is backup
Volume Serial Number is XXXX-YYYY

Directory of Z:\MonBackUps

01/18/2006 07:54 AM <DIR> .
01/19/2006 04:50 AM <DIR> ..
01/12/2006 03:26 AM 123,477,113,856 MonBackup.bkf
01/14/2006 03:00 PM 50,861,056 y Backup.bkf
01/18/2006 08:09 AM 1,841,537,024 MonBackupInc.bkf
3 File(s) 125,369,511,936 bytes
2 Dir(s) 623,347,318,784 bytes free
User=Bob,
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;"C:\Program
Files\Symantec\Norton Ghost 2003\";C:\Program Files\QuickTime\QTSystem\
Wed 01/25/2006 19:15:34.26 End of task

I guess this is telling me:
I don't have access to the mapped drive Z:
Any idea how I get access to this when logged out? It is a mapped drive
(Z:) to a NAS device on the network. I scheduled the backup as an
administrative user that should have access to this drive. Should I try to
access it by name (like \\NAS\backup)?
 
P

Pegasus \(MVP\)

Mapped drives exist only within the context where
they were created. You use drive Z: - yet you never
map a share to drive Z:!

Two additional points:
- When accessing networked resources under a scheduled
task, you must be ***very*** careful and ensure that the
account used for the scheduled task has sufficient access
rights to the shared resource.
- While it is possible to map drive letters agains shares in
scheduled task, this is not a good idea. The drive letter
might be in use by some other task. Use UNC coding
if at all possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top