Re: Scripted backups..



Ummm...
I'm not too smart...

What I found out was this...
I had the File share permissions set correctly and but not the NTFS
permissions. When I copied the data to the new server I did not setup NTFS
permissions, onlt share permissions. I could create new files but no modify
existing ones.

Sorry to be such a bother...

"Pegasus (MVP)" wrote:

I don't know what's going on here. In such cases I usually
try this and that and something else until I stumble over
something that gives me a clue to the cause of the problem.
In your case I would vary the following things:
- Create a new backup.bks file.
- Store it in an unprotected area, e.g. make it c:\test.bks.
- Change the location of the .bkf file to a local drive, e.g. d:\test.bkf

You should also report the contents of your .bks file.

Lastly, I don't much like your 8.3 file and folder names.
They are abbreviations of the real thing and if possible
you should use LFNs, surrounded with double quotes.


"Charles" <Charles@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:186B4AD6-EB73-4737-8857-9F64BC0C6111@xxxxxxxxxxxxxxxx
The error message is not in the batch file as all the lines go through
fine.
The error is on the NTBackup log file.

Here is a copy of the output from the batch file

D:\Backups>net use Z: \\datamax1\***Industries /Persistent:NO
The command completed successfully.

D:\Backups>dir z:
Volume in drive Z is DataMAX
Volume Serial Number is 7CEB-4EA8
Directory of Z:\
08/27/2006 01:08 PM <DIR> .
08/27/2006 01:08 PM <DIR> ..
08/26/2006 07:40 AM 82,155,204,608 BackupFull.bkf
08/22/2006 01:25 AM 3,459,694,592 Monday.bkf
08/25/2006 01:20 AM 3,456,525,312 Thursday.bkf
08/23/2006 01:18 AM 3,054,469,120 Tuesday.bkf
08/24/2006 01:24 AM 3,318,350,848 Wednesday.bkf
5 File(s) 95,444,244,480 bytes
2 Dir(s) 592,788,643,840 bytes free
D:\Backups>del

c:\DOCUME~1\ADMINI~1\LOCALS~1\APPLIC~1\Microsoft\WINDOW~2\NTBackup\data\*.lo
g
D:\Backups>C:\WINDOWS\system32\ntbackup.exe backup
"@D:\Backups\backup.bks"
/n "Monday.bkf created 7/23/2006 at 9:29 AM" /d "Set created 7/23/2006 at
9:29 AM" /v:no /r:no /rs:no /hc:off /m incremental /j "Monday" /l:s /f
"Z:\Monday.bkf"
D:\Backups>copy

c:\DOCUME~1\ADMINI~1\LOCALS~1\APPLIC~1\Microsoft\WINDOW~2\NTBackup\data\*.lo
g
d:\Backups\log.txt

c:\DOCUME~1\ADMINI~1\LOCALS~1\APPLIC~1\Microsoft\WINDOW~2\NTBackup\data\back
up05.log
1 file(s) copied.
D:\Backups>net use /delete Z:
Z: was deleted successfully.

D:\Backups>wscript email.vbs
D:\Backups>del d:\Backups\log.txt
D:\Backups>EXIT


And here is a copy of the NTBACKUP log file.



Backup Status
Operation: Backup
Active backup destination: File
Media name: "Monday.bkf created 8/27/2006 at 1:18 PM"

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 8/27/2006 at 1:18 PM.
Directories: 0
Files: 0
Bytes: 0
Time: 1 second
Error: C: is not a valid drive, or you do not have access.

----------------------
The operation did not successfully complete.
----------------------


"Pegasus (MVP)" wrote:


"Charles" <Charles@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:919DAA8B-6E0A-4DC0-834C-4D8FACDD1796@xxxxxxxxxxxxxxxx
I have Server 2003 R2 with Exchange 2003 SP2. All updates and service
packs
completed. Here is a strange problem.
I have my backups scripted to go to a network drive that gets mapped
as
part
of the ".bat" script. This ".bat file is scheduled to run and has been
running fine for some time. I went in to check the backup and run it
manually
- either by executing the bat file or running the scheduled task and I
get
this error

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

Backup fails...

If I open ntbackup and load the bks file and run it as a one time with
the
start backup button it works fine. I created a new test bks and it has
the
same result - manual onetime from within NTBackup works but executed
from
a
batch file it does not.

Only thing that has changed it the server that holds the mapped drive.
I
just changed it to a Windows Storage Server 2003 R2.

The server in question is not on the same domain, but does have access
to
a
local account on the Storage Server 2003 R2. I can open the folder and
copy
files back and forth no problem. The script is mapping the folder and
assigning the drive letter and I can read the ntbackup files and write
new
ones.

Below is the batch file - It is run as administrator on the server

net use Z: \\datamax1\Share /Persistent:NO
dir z:
del


c:\DOCUME~1\ADMINI~1\LOCALS~1\APPLIC~1\Microsoft\WINDOW~2\NTBackup\data\*.lo
g
C:\WINDOWS\system32\ntbackup.exe backup "@D:\Backups\backup.bks" /n
"Monday.bkf created 7/23/2006 at 9:29 AM" /d "Set created 7/23/2006 at
9:29
AM" /v:no /r:no /rs:no /hc:off /m incremental /j "Monday" /l:s /f
"Z:\Monday.bkf"
copy


c:\DOCUME~1\ADMINI~1\LOCALS~1\APPLIC~1\Microsoft\WINDOW~2\NTBackup\data\*.lo
g
d:\Backups\log.txt
net use /delete Z:
wscript email.vbs "little script to e-mail me the ntbackup file copied
above"
del d:\Backups\log.txt
EXIT

Your batch file has several lines that refer to drive C:. You need to
report which one of these lines generates the error you report. Place
a marker after each line (e.g. "echo This was Line 5 & pause > nul"),
invoke the batch file manually and report the result.






.