Question Locked

NT Backups failing

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Am currently attempting to run ntbackups to a samba share. The backups are scheduled to run at 1:00am every night as the domain administrator. If I run the scheduled task when logged in as the domain admin it runs fine. The problem is that the scheduled tasks are failing when the domain admin is not logged in. If I check the backup log it tells me the following:

Backup started on 19/06/2008 at 1:05 AM.

Error: The device reported an error on a request to write data to media.
Error reported: Unknown error.
There may be a hardware or media problem.
Please check the system event log for relevant failures.
The operation was ended.
Backup completed on 19/06/2008 at 1:10 AM.
Directories: 2
Files: 0
Bytes: 190,411,706
Time: 4 minutes and 54 seconds

Error: D: is not a valid drive, or you do not have access.

How can it be that the domain administrator does not have access to this drive when not logged in but it runs fine when it is.

Please help.

5 replies

by jtmurphy

I am going to assume that D: is a mapped drive where the backup is to be stored. If it is not, ignore the rest of this.
Any mapped drive is lost when you log off the computer. Unless the scheduled task re-mapps the drive using the Domain Admin credentials, the drive will not exist when the scheduled task runs. I usually avoid this by using a UNC path to the \\servername\folder where the backup is to be stored. In this case, the credentials used by the scheduled task will be sent for validation by the destination computer.

by shaun

nope...D is the drive that i would like to back up. I have added the backup script I wrote so you can see what it should be doing.

REM Releasing mapped drive Z:\....

net use Z: /d /y

REM Mapping \\servername\share to Z:\....

net use Z: \\servername\share /user:username password

REM Setting time & date variables....

set dat=%date%
for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set dt=%%i-%%j-%%k-%%l
set dtt=%dt%

REM Performing selective Incremental backup to \\servername\share....

ntbackup.exe backup "@C:\BackupScripts\Incremental.bks" /V:yes /r:no /rs:no /hc:off /m incremental /j "Incremental Backup" /l:s /f "Z:\Incremental_%dtt%.bkf"

Hope you can shed some light...

by jtmurphy

Don't see anything wrong with the script, Since it works when logged in, i don't think it is causing any problem.
It you haven't already, check the Security log around the time the scheduled task runs to see if there are any entries. If so, they may shed some light on the problem.
If not, try disabling your Anti-Virus software just prior to the scheduled task running.

by shaun

Been away so haven't had a chance to reply sorry.

Have checked the event log and there are no other errors
around the time of the backup. Have disable the AV
temporarily overnight while the backup ran and it still failed.

Could it be because I have been backing up the system state
with the data...?

This discussion is closed to new replies.