Computing.Net > Forums > Windows 2000 > NTBackup works only if logged in

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

NTBackup works only if logged in

Reply to Message Icon

Name: mborg
Date: April 26, 2006 at 06:28:47 Pacific
OS: win2000 server
CPU/Ram: n/a
Product: n/a
Comment:


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



Sponsored Link
Ads by Google

Response Number 1
Name: Curt R
Date: April 26, 2006 at 15:26:59 Pacific
Reply:

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 off

rem 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.


0

Response Number 2
Name: retroguy
Date: April 26, 2006 at 16:22:49 Pacific
Reply:

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


0

Response Number 3
Name: don2006
Date: April 26, 2006 at 16:24:29 Pacific
Reply:

Don't logoff, just hit ctrl alt del and lock the computer.
Why go though all that other hassel?


0

Response Number 4
Name: mborg
Date: April 27, 2006 at 01:52:06 Pacific
Reply:

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:)


0

Response Number 5
Name: mborg
Date: April 27, 2006 at 02:02:23 Pacific
Reply:


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


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: NTBackup works only if logged in

VBA macro works on some log-ins www.computing.net/answers/windows-2000/vba-macro-works-on-some-logins/52408.html

System Reboots when Logging In www.computing.net/answers/windows-2000/system-reboots-when-logging-in/16458.html

Macromedia Flash runs only if admin or www.computing.net/answers/windows-2000/macromedia-flash-runs-only-if-admin-or/35226.html