Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am using NTBackup on a Win2000 server. The command string for my scheduled task (run as administrator) is as follows:G:\WINNT\system32\ntbackup.exe backup "@G:\DataFiles\NTBackup\FileServer.bks" /n "Backup of File Server on CRM" /d "File Server Backup" /um /v:yes /r:no /rs:no /hc:off /m normal /j "jobFileServer" /l:f /f "I:\3_WED_FileServer.bkf"
Drive I (the destination) is a mapped network drive on another machine.
When I am logged in locally as administrator, everything works fine. If I am not logged in, the scheduled task still runs normally but the backup doesn't take place. In the log in NTBackup Tools>Reports I see the following entry:
The operation was not performed because the specified media cannot be found.
This also happens when I am logged in using Remote Desktop, even though I log in as administrator. Strangely enough, if I paste the same command string in Start>Run the backup works!?!
So, my problem is that I would like my scheduled backup to run even though I'm not logged in. This is not a win2k specific issue - same behaviour on winXP.
TIA,
Mark

The operation was not performed because the specified media cannot be found.
It looks like your losing the drive mapping. The following is a batchfile I use to do backups at home. It first maps a network drive, performs the backup, then copies the backup file to the mapped drive. Finally, it disconnects the drive. You can revamp it to suit your setup and put your command line in it.
***Start Batchfile***
@echo offrem map network drive to backup folder on remote PC/Server
net use w: \\server\sharedfolder /persistent:yes
rem perform the backup
C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Daily Backup.bks" /n "Daily Backup.bkf created 6/6/2005 at 11:04 AM" /d "Set created 6/6/2005 at 11:04 AM" /v:yes /r:no /rs:no /hc:off /m normal /j "Daily Backup" /l:s /f "C:\Backup\Daily Backup.bkf"
rem copy the backup to the server
xcopy c:\backup\"daily backup.bkf" w:\ /y
rem release mapped drive
net use w: /d /y
rem exit the batch file
exit
*** End Batchfile ***
Once you've created your backup set, changed the batchfile to suit your setup and tested to ensure it works properly, create a scheduled task to run the batchfile nightly. Done properly, this runs at night whether you're logged on or off. I use this same batchfile (with appropriate changes) at home on all my PC's. They all copy their individual backups to my main PC and I burn that backup folder (and all backups inside it) once a week to a DVD-RW. I have a box of 5 and alternate them weekly.

this is a known issue with NTBackup.
You have to run the backup via Scheduled Tasks (schtasks) as "System".
schtasks /RU System
However, that's going to mess up your shared drive access I think, so it's a tough one. Try the above batch file.
"If we don't succeed, we run the risk of failure." - BILL CLINTON

Thanks for all your responses.
As I said, if I run the command from the console it works, so this is not a problem with my mapped drive - the backup only fails when I'm not logged. As for simply not logging off: that's what I'm doing right now but I'm not happy with the solution - what if the server restarts after a power cut (not unheard of in my area)...
Now I'm thinking maybe the mapped drive *is* the problem after all, since maybe it is only mapped when I log in - let me check:)

Looks like it's working now!!My scheduled task was set to run as administrator. This means it will have admin access privileges but it will NOT have admin's mapped network drives. I changed I: to the full network path \\computer\folder\ and it seems to be working.
thanks everyone,
Mark

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |