Re: Disk back-up using task scheduler?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Paul Westwell (paul.news_at_nospam.westwell.me.uk)
Date: 01/25/05


Date: Tue, 25 Jan 2005 21:29:03 GMT

Pegasus,

In your script below have you got the switches in the right location?

On the MS website the syntax is...

Syntax
xcopy Source [Destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g]
[/d[:mm-dd-yyyy]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a|/m}] [/n]
[/o] [/x] [/exclude:file1[+[file2]][+[file3]] [{/y|/-y}] [/z]

Below you have xcopy followed immediately by the switches.

As I don't fully understand the full script I am not sure if this is correct
or not so you help would be greatly appreciated.

BTW I am using an existing xcopy in the following format....

XCOPY E:\*.* F:\ /C/V/F/I/D/S/K/H/O/Y

Any chance I could be cheeky and ask you to adjust to take into account my
paths and switches, I do like your logging & error idea!

Regards,

Paul

"Paul Westwell" <paul.news@nospam.westwell.me.uk> wrote in message
news:2cgJd.687$Ht4.452@newsfe2-gui.ntli.net...
> Thanks guys, I appreciate the comments on removable media etc and will
> look into a better solution.
>
> The script looks great, I had put together a very basic xcopy batch file
> myself but the additional logging is nice to have and I could not figure
> that out!
>
> Regards,
>
> Paul
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:%23d74PzaAFHA.3820@TK2MSFTNGP11.phx.gbl...
>> Here is a simple example for c:\tools\MyBackup.bat. Use
>> the Task Scheduler to invoke once every day.
>>
>> @echo off
>> set source=c:\MyHomeMedia
>> set target=d:\Backups\MyHomeMedia
>> set report=c:\Logs\backup.log
>> set error=c:\Logs\backup.err
>> if not exist c:\logs md c:\Logs
>>
>> echo Backup performed on %date% at %time% > "%report%"
>> echo Backup performed on %date% at %time% > "%error%"
>> xcopy /s /y "%Source%" "%Target%\" 1>"%report%" 2>"%error%"
>>
>> The batch file generates two log files in the folder c:\Logs. Use
>> notepad.exe to examine them!
>>
>> As Ken rightly points out, backing up to a local disk only is
>> risky. I often use one local disk plus one out of two or more
>> removable media.
>>
>>
>> "Paul Westwell" <paul.news@nospam.westwell.me.uk> wrote in message
>> news:spOId.63$od7.14@newsfe1-gui.ntli.net...
>>> Pegasus,
>>>
>>> The data on the disk is Home Media, photographs, mp3 files, video etc,
>>> no
>>> programs or system file.
>>>
>>> Any help in pointing me towards a batch file that could use xcopy.exe
>>> and
>>> could be run from XP task scheduler?
>>>
>>> Regards,
>>>
>>> Paul
>>>
>>>
>>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>>> news:uxDjCCVAFHA.1524@TK2MSFTNGP09.phx.gbl...
>>> >
>>> > "Paul Westwell" <paul.news@nospam.westwell.me.uk> wrote in message
>>> > news:%OMId.1205$w65.557@newsfe5-win.ntli.net...
>>> >> Hi,
>>> >>
>>> >> I have a machine running XP home with three disk drives. I would like
>> to
>>> > be
>>> >> able to schedule XP to backup one disk to the other on a weekly
>>> >> basis,
>>> > this
>>> >> would simply be a disk copy and overwrite existing contents (or just
>>> > replace
>>> >> those that have changed).
>>> >>
>>> >> If this possible to do this using the task scheduler?
>>> >>
>>> >> Regards,
>>> >>
>>> >> Paul
>>> >>
>>> >>
>>> >
>>> > It depends.
>>> >
>>> > If you wish to back up your data files then xcopy.exe, embedded in
>>> > a batch file, would be your best choice.
>>> >
>>> > If you wish to back up your WinXP system files then you would
>>> > need to use a tool such as ntbackup.exe, which is considerably
>>> > harder to use.
>>> >
>>> >
>>>
>>>
>>
>>
>
>



Relevant Pages

  • Re: Disk back-up using task scheduler?
    ... The location of the switches is a matter of preference in most ... If you tell me which partof my script you do not understand ... > BTW I am using an existing xcopy in the following format.... ...
    (microsoft.public.windowsxp.general)
  • Re: Disk back-up using task scheduler?
    ... Got the script working fine now.. ... When the script runs from Task Scheduler it brings up the cmd window ... You have a whole zoo of switches ... >> On the MS website the syntax is... ...
    (microsoft.public.windowsxp.general)
  • Re: PreventDetect Dual Homing
    ... Aaron Leonard wrote: ... ~ why we want a script that disable the wireless NIC and left the wired ... If you have Cisco switches, then turn on BPDU guard on the wired access ... which will result in additional delay when ports come up ...
    (comp.dcom.sys.cisco)
  • RE: code for silent installing software using VBscript
    ... VC++2005,Windows installer services3.0,OWC10.0)with silent installation ... the script should be able to check the previous registry entry,which ... via vbscript.i have command line switches and it is working fine using cmd ...
    (microsoft.public.scripting.vbscript)
  • Re: Disk back-up using task scheduler?
    ... "Pegasus " wrote in message ... >> Got the script working fine now.. ... >> When the script runs from Task Scheduler it brings up the cmd window ... You have a whole zoo of switches ...
    (microsoft.public.windowsxp.general)