<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [dba-Tech] Security measures</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=395550513-28082003><FONT face=Arial color=#0000ff
size=2>Jon,</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=395550513-28082003><FONT face=Arial color=#0000ff size=2>Open a
dos box.</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT face=Arial color=#0000ff size=2>Type
in xcopy /? to get a list of all switches.</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>C:\>xcopy /?<BR>Copies files and
directory trees.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>XCOPY source [destination] [/A | /M]
[/D[:date]] [/P] [/S [/E]] [/V]
[/W]<BR>
[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T]
[/U]<BR>
[/K] [/N] [/O] [/X] [/Y] [/-Y]
[/Z]<BR>
[/EXCLUDE:file1[+file2][+file3]...]</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>
source Specifies the file(s) to
copy.<BR> destination Specifies the location and/or name of new
files.<BR> /A
Copies only files with the archive attribute
set,<BR>
doesn't change the attribute.<BR>
/M Copies only files
with the archive attribute
set,<BR>
turns off the archive attribute.<BR> /D:m-d-y
Copies files changed on or after the specified
date.<BR>
If no date is given, copies only those files
whose<BR>
source time is newer than the destination time.<BR>
/EXCLUDE:file1[+file2][+file3]...<BR>
Specifies a list of files containing strings. When any of
the<BR>
strings match any part of the absolute path of the file to
be<BR>
copied, that file will be excluded from being copied.
For<BR>
example, specifying a string like \obj\ or .obj will
exclude<BR>
all files underneath the directory obj or all files with
the<BR>
.obj extension respectively.<BR>
/P Prompts you
before creating each destination file.<BR>
/S Copies
directories and subdirectories except empty ones.<BR>
/E Copies
directories and subdirectories, including empty
ones.<BR>
Same as /S /E. May be used to modify /T.<BR>
/V Verifies each new
file.<BR> /W
Prompts you to press a key before copying.<BR>
/C Continues copying
even if errors occur.<BR>
/I If destination
does not exist and copying more than one
file,<BR>
assumes that destination must be a directory.<BR>
/Q Does not display
file names while copying.<BR>
/F Displays full
source and destination file names while copying.<BR>
/L Displays files
that would be copied.<BR>
/H Copies hidden and
system files also.<BR>
/R Overwrites
read-only files.<BR>
/T Creates directory
structure, but does not copy files. Does
not<BR>
include empty directories or subdirectories. /T /E
includes<BR>
empty directories and subdirectories.<BR>
/U Copies only files
that already exist in destination.<BR>
/K Copies
attributes. Normal Xcopy will reset read-only attributes.<BR>
/N Copies using the
generated short names.<BR>
/O Copies file
ownership and ACL information.<BR>
/X Copies file audit
settings (implies /O).<BR>
/Y Suppresses
prompting to confirm you want to overwrite
an<BR>
existing destination file.<BR>
/-Y Causes prompting to
confirm you want to overwrite
an<BR>
existing destination file.<BR>
/Z Copies networked
files in restartable mode.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>The switch /Y may be preset in the
COPYCMD environment variable.<BR>This may be overridden with /-Y on the command
line.</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=395550513-28082003><FONT face=Arial color=#0000ff
size=2>Therefore the switches I use: <FONT face="Times New Roman"
color=#000000>/E /Y /C /M /I</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>mean:</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>Copy directories and sub
directories</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>Suppress prompt to copy over
existing file</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>Continue copy even if error
occurs (file open for example)</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>***</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>Copy only files with the
archive attribute - turn off attribute </FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>THIS is the one that handles
copying only the changed files. When any program is opened, Windows sets
the archive attribute to denote that it has changed. This switch says only
copy the files with the archive attribute set (have changed) and then CLEAR that
attribute (say the file has been backed up)</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>***</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>Assume destination is a
directory</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>This process is VERY fast using
disk-disk on the same machine. Since only changed files get copied I never
have to worry about work being lost. It is fast enough that you could
probably even set it up to do it once an hour if you were really paranoid.
</FONT></SPAN></DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=395550513-28082003><FONT size=2>I have a UPS for every machine
with a cable going to the machine and software installed telling the machine
that power has failed and the machine needs to close windows gracefully if
the power is off for more than about 2 minutes. This works well so I don't
need to worry about power outages corrupting things on me. My "Backup on
the cheap" handles my DATA backup pretty much without a
hitch.</FONT></SPAN></DIV>
<P><FONT size=2>John W. Colby<BR>www.colbyconsulting.com</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
dba-tech-bounces@databaseadvisors.com
[mailto:dba-tech-bounces@databaseadvisors.com]<B>On Behalf Of </B>Jon
Tydda<BR><B>Sent:</B> Thursday, August 28, 2003 8:37 AM<BR><B>To:</B>
'Discussion of Hardware and Software issues'<BR><B>Subject:</B> RE: [dba-Tech]
Security measures<BR><BR></FONT></DIV>
<P><FONT size=2>John</FONT> </P>
<P><FONT size=2>That's inspired... What do all the individual switches mean?
I've only got a vague memory of DOS I'm afraid :-)</FONT> </P><BR>
<P><FONT size=2>Jon</FONT> </P>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: John
Colby [<A
href="mailto:jcolby@colbyconsulting.com">mailto:jcolby@colbyconsulting.com</A>]
</FONT><BR><FONT size=2>Sent: 28 August 2003 13:37</FONT> <BR><FONT size=2>To:
Discussion of Hardware and Software issues</FONT> <BR><FONT size=2>Subject:
RE: [dba-Tech] Security measures</FONT> </P><BR>
<P><FONT size=2>BTW, I generated a batch file that copies all of the CHANGED
files from a given path to another path. I then run that from my windows
scheduler once a day.</FONT></P>
<P><FONT size=2>The batch file looks like:</FONT> </P>
<P><FONT size=2>xcopy d:\dev e:\Backup\dev /E /Y /C /M /I</FONT> <BR><FONT
size=2>xcopy d:\C2DbClientBilling e:\Backup\C2DbClientBilling /E /Y /C /M /I
xcopy d:\Clients e:\Backup\Clients /E /Y /C /M /I xcopy d:\COLBYCONSULTING
e:\Backup\COLBYCONSULTING /E /Y /C /M /I xcopy d:\ColbyConsultingWebNew
e:\Backup\ColbyConsultingWebNew /E /Y /C /M /I xcopy d:\NVFCNew
e:\Backup\NVFCNew /E /Y /C /M /I xcopy d:\Projects e:\Backup\Projects /E /Y /C
/M /I xcopy "c:\dOCUMENTS AND SETTINGS" "e:\Backup\documents and settings" /E
/Y /C /M /I</FONT></P>
<P><FONT size=2>As you can see, I am simply doing an XCopy from my D:\Dev to
e:\Backup. This copies the entire directory the first time. The switches
cause the copy to only copy CHANGED files, thus the second and subsequent
times the xcopy is darned fast. However if I create a new client
directory in my dev</FONT></P>
<P><FONT size=2>(development) directory, it is automatically backed up.
In this case, the</FONT> <BR><FONT size=2>E: drive is a second physical drive
in the same machine. However there is no reason why it couldn't be a
mapped drive on a completely different machine, or for that matter even a ftp
up to a directory on the net if I wanted to pay for disk storage out
there.</FONT></P>
<P><FONT size=2>I call this "backup on the cheap"</FONT> </P>
<P><FONT size=2>John W. Colby</FONT> <BR><FONT
size=2>www.colbyconsulting.com</FONT> </P></BLOCKQUOTE></BODY></HTML>