Re: system variable
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Thu, 5 Jun 2008 20:26:38 +0200
Your problem lies probably here:
\\Frpoi-bex\E$
What account do you use for the scheduled job? Does
it have write-access to \\Frpoi-bex\E$? You can easily
find out by using the Task Scheduler to run this batch
file:
@echo off
echo %date% %time% %UserName% >> c:\test.txt
copy /y %SystemRoot%\System32\more.com \\Frpoi-bex\E$ 1>>c:\test.txt 2>>&1
C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and
Settings\luc\Local Settings\Application Data\Microsoft\Windows
NT\NTBackup\data\system_state_ad3.bks" /n "SYSTEMESTATE_AD_3.bkf created
17/04/2008 at 15:04" /d "Set created 17/04/2008 at 15:04" /v:yes /r:no
/rs:no /hc:off /m copy /j "system_state_ad3" /l:s /f
"\\Frpoi-bex\E$\ADdeAD3\%date:/=-%_SYSTEMESTATE_AD_3.bkf" 1>>c:\test.txt
2>>&1
Now have a look at c:\test.txt - it will tell you a lot! You must also
examine the backup log that is generated by ntbackup.exe.
"luc bonenfant" <luc@xxxxxxxxxxx> wrote in message
news:OFUETbyxIHA.4492@xxxxxxxxxxxxxxxxxxxxxxx
I prefere this unique command :
C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and
Settings\luc\Local Settings\Application Data\Microsoft\Windows
NT\NTBackup\data\system_state_ad3.bks" /n "SYSTEMESTATE_AD_3.bkf created
17/04/2008 at 15:04" /d "Set created 17/04/2008 at 15:04" /v:yes /r:no
/rs:no /hc:off /m copy /j "system_state_ad3" /l:s /f
"\\Frpoi-bex\E$\ADdeAD3\%date:/=-%_SYSTEMESTATE_AD_3.bkf"
but It can be this one :
set mydate=%date:/=-%
and
C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and
Settings\luc\Local Settings\Application Data\Microsoft\Windows
NT\NTBackup\data\system_state_ad3.bks" /n "SYSTEMESTATE_AD_3.bkf created
17/04/2008 at 15:04" /d "Set created 17/04/2008 at 15:04" /v:yes /r:no
/rs:no /hc:off /m copy /j "system_state_ad3" /l:s /f
"\\Frpoi-bex\E$\ADdeAD3\%mydate%_SYSTEMESTATE_AD_3.bkf"
But it don't want in the scheduler. It works fine in the cmd console.
"Pegasus (MVP)" <I.can@xxxxxxxxxx> a écrit dans le message de news:
O9jcxzxxIHA.4492@xxxxxxxxxxxxxxxxxxxxxxx
Type
set /?
and look for "Character substitution" to see how I replaced
slashes with dashes.
The failure you report is unlikely to be caused by the %MyDate%
substitution. Post your backup command so that we can see
what you're doing.
"luc bonenfant" <luc@xxxxxxxxxxx> wrote in message
news:udeb1OwxIHA.2292@xxxxxxxxxxxxxxxxxxxxxxx
arf bad news !
it works well in cmd when I launch the ntbackup command but in the task
scheduler,
ntbackup start and stop directly.
:-(
"luc bonenfant" <luc@xxxxxxxxxxx> a écrit dans le message de news:
%23h4KqIwxIHA.1504@xxxxxxxxxxxxxxxxxxxxxxx
yes
%Date:/=-%
exactly what I need !!!
do you know where can I find any explaination on how format system
variable and list of variable and so on ....
Thank's a lot !!!
"Pegasus (MVP)" <I.can@xxxxxxxxxx> a écrit dans le message de news:
eVKzy$vxIHA.6096@xxxxxxxxxxxxxxxxxxxxxxx
Try this in your batch file:
set MyDate=%Date:/=-%
echo %MyDate%
"luc bonenfant" <luc@xxxxxxxxxxx> wrote in message
news:eOqQAWvxIHA.1772@xxxxxxxxxxxxxxxxxxxxxxx
hello,
I 'd like to backup files every nights in a new "bkf" file via
ntbackup (svr 2003) for example :
c:\backup\2008_06_04.bkf
c:\backup\2008_06_05.bkf
c:\backup\2008_06_06.bkf
.
I 'd like to use %date% but it looks like 2008/06/04 so "/" don't
works fine in files name.
Any solutions ?
thank's
PS : if you have the complete nt backup command for this, I ll be
glade !
.
- References:
- variable system
- From: luc bonenfant
- Re: variable system
- From: Pegasus \(MVP\)
- Re: variable system
- From: luc bonenfant
- Re: variable system
- From: luc bonenfant
- Re: variable system
- From: Pegasus \(MVP\)
- Re: variable system
- From: luc bonenfant
- variable system
- Prev by Date: Re: Remote folder options
- Next by Date: Re: Task Scheduler & Event Logs
- Previous by thread: Re: variable system
- Next by thread: Detect service role installed on 2008 server
- Index(es):
Relevant Pages
|