Incremental Backup ??

R

RJK

Here's an easy one for all you batch file writers ! ?

I've just copied a biggish directory structure onto external USB hd drive
F:\ , using Windows Explorer ( 44.9gb's )

Source was internal hd D:\ with 31 root-directories, all dragged and dropped
into F:\D progs etc ...(to ext. USB hd :)

What's the best way to update the matching structure on external USB hd F:\D
progs etc ?

e.g. let's say I've added a sub-directory - containing files, or several
sub-dirs. containing files and further sub-dirs.and files, to the 31
root-dirs. on D:\ ...rather than wade through it manually:-

How can I, say, xcopy new additions to the structure on D:\ to F:\D progs
etc ...without having to overwrite to whole structure on F:\ again ?

regards, Richard

I'm guessing along the lines of using attrib to clear all the archive
flags from directories and files on source drive D:\ - (already copied to
ext USB hd), so that only new additions will have the archive bit set.
Then I can try to batch file the job but, VERY rusty - hence posting here
:)

TIA

regards, Richard
 
P

Pegasus [MVP]

RJK said:
Here's an easy one for all you batch file writers ! ?

I've just copied a biggish directory structure onto external USB hd drive
F:\ , using Windows Explorer ( 44.9gb's )

Source was internal hd D:\ with 31 root-directories, all dragged and
dropped into F:\D progs etc ...(to ext. USB hd :)

What's the best way to update the matching structure on external USB hd
F:\D progs etc ?

e.g. let's say I've added a sub-directory - containing files, or several
sub-dirs. containing files and further sub-dirs.and files, to the 31
root-dirs. on D:\ ...rather than wade through it manually:-

How can I, say, xcopy new additions to the structure on D:\ to F:\D
progs etc ...without having to overwrite to whole structure on F:\
again ?

regards, Richard

I'm guessing along the lines of using attrib to clear all the archive
flags from directories and files on source drive D:\ - (already copied to
ext USB hd), so that only new additions will have the archive bit set.
Then I can try to batch file the job but, VERY rusty - hence posting here
:)

TIA

regards, Richard

Have a look at the output from xcopy /?. The /d switch will probably meet
your requirements.
 
R

RJK

Pegasus said:
Have a look at the output from xcopy /?. The /d switch will probably meet
your requirements.

----- Original Message -----
From: "Pegasus [MVP]" <[email protected]>
Newsgroups: microsoft.public.windowsxp.general
Sent: Tuesday, June 09, 2009 2:48 PM
Subject: Re: Incremental Backup ??

Have a look at the output from xcopy /?. The /d switch will probably meet
your requirements.

Many thanks, ...in the end I settled for

@echo off
cls
echo .
echo .
echo About to xcopy D to F with /m/e/f switches
echo note that /m resets archive bit on source drive files
echo .
echo .
pause
cls
echo .
echo . ***underway :) ***
echo .
xcopy d:\*.* f:\Dprogsetc /m/e/f
echo .
echo .
pause
cls
echo .
echo .
echo RJK DONE !!!
echo .
echo .
pause
cls

....filenamed budtof.bat ...and desktop shortcut to it.

....tested it by dropping a couple of files in to root and sub-dirs. on D:\
and they get copied to ext. hd F:\ ...in the proper place / dirs. , so I got
pathanmes correct !!
....surprising what comes back after a bit of a struggle !

regards, Richard
 
P

Pegasus [MVP]

RJK said:
----- Original Message -----
From: "Pegasus [MVP]" <[email protected]>
Newsgroups: microsoft.public.windowsxp.general
Sent: Tuesday, June 09, 2009 2:48 PM
Subject: Re: Incremental Backup ??



Many thanks, ...in the end I settled for

@echo off
cls
echo .
echo .
echo About to xcopy D to F with /m/e/f switches
echo note that /m resets archive bit on source drive files
echo .
echo .
pause
cls
echo .
echo . ***underway :) ***
echo .
xcopy d:\*.* f:\Dprogsetc /m/e/f
echo .
echo .
pause
cls
echo .
echo .
echo RJK DONE !!!
echo .
echo .
pause
cls

...filenamed budtof.bat ...and desktop shortcut to it.

...tested it by dropping a couple of files in to root and sub-dirs. on D:\
and they get copied to ext. hd F:\ ...in the proper place / dirs. , so I
got
pathanmes correct !!
...surprising what comes back after a bit of a struggle !

regards, Richard

Thanks for the feedback. Keep in mind that there are several utilities that
can and will set/reset the archive bit. You might miss out on some files and
copy other files twice if you rely on it. I also recommend that you use the
/y and /c switches in order to make the batch file more robust.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top