Re: system variable

Tech-Archive recommends: Speed Up your PC by fixing your registry



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 !













.



Relevant Pages

  • Re: Ntbackup seems not to start properly 30 to 50% of the time.
    ... Ntbackup seems not to start properly 30 to 50% of the time. ... I have a simple script running from scheduler. ... I built a small test server and using AT instead of Windows Scheduler, ... It would appear that a re-boot allows the backup to complete once. ...
    (microsoft.public.windows.server.general)
  • Re: Ntbackup seems not to start properly 30 to 50% of the time.
    ... Ntbackup seems not to start properly 30 to 50% of the time. ... I have a simple script running from scheduler. ... I built a small test server and using AT instead of Windows Scheduler, ... It would appear that a re-boot allows the backup to complete once. ...
    (microsoft.public.windows.server.general)
  • Re: Ntbackup seems not to start properly 30 to 50% of the time.
    ... Each night the script ran as a scheduled task, but the ntbackup routine itself did not. ... there is no entry in the event log. ... I built a small test server and using AT instead of Windows Scheduler, I had the script successfully run 6 backups per day for the last three days. ... This evening, again a 33 minute gap, no entry in the backup log and no "ntbackup" entry in the event log. ...
    (microsoft.public.windows.server.general)
  • Re: Cant schedule a batch file to run in the XP Pro Scheduler
    ... If your backup program called in the BAT file is ... > does NOT run fine is when I try to call the backup.bat batch file ... Why doesn't the XP task scheduler handle batch files? ... > I want to automate the backup of our Retail Management Software ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Ntbackup seems not to start properly 30 to 50% of the time.
    ... Ntbackup seems not to start properly 30 to 50% of the time. ... I have a simple script running from scheduler. ... It would appear that a re-boot allows the backup to complete once. ...
    (microsoft.public.windows.server.general)