Backup by synchronizing

G

Guest

I have what I believe is a stupidly obvious option for backing up files and
avoiding death by crash. I use two drives on separate machines networked
together. I use identical directory structures on each. I try to save the
files that are newer to the drive with the older version.
Discussions of synchronizing under Help migrate toward using My Briefcase
and updating files from a laptop to a "main" computer. The files move in one
direction only. They do not discuss my situation.
On Win98 I had a Dos protocol that almost worked. By using a copy command
with a switch for copying only the newer file, I could update in both
directions. Still, to have a built in utility that would check and update
both drives would have been preferable. Any hope of this?
 
T

Trevor L.

Lost_in_sight said:
I have what I believe is a stupidly obvious option for backing up
files and avoiding death by crash. I use two drives on separate
machines networked together. I use identical directory structures on
each. I try to save the files that are newer to the drive with the
older version.
Discussions of synchronizing under Help migrate toward using My
Briefcase and updating files from a laptop to a "main" computer. The
files move in one direction only. They do not discuss my situation.
On Win98 I had a Dos protocol that almost worked. By using a copy
command with a switch for copying only the newer file, I could update
in both directions. Still, to have a built in utility that would
check and update both drives would have been preferable. Any hope of
this?

Yes, I have tried a batch file with switches like this
xcopy "%USERPROFILE%\Desktop\*.*" "F:\0 C_Backup\Documents and
Settings\Trevor\Desktop" /D /E /C /I /Q /H /R /K /Y

I didn't think to try it in the opposite direction, but no doubt it would
work. My purpose was to backup *from* C: drive so writing files from the
backup back to the C: drive wasn't on my agenda

However, while the following may seem an obscure source (a Spanish site),
it has a program named Directory Compare which I have found very useful - it
does just what you want - compares two specified directories and gives you
the option of copying in either direction or synchronising (copying in both
directions).

http://tp.lc.ehu.es/jma/win95.html (I use DrComp253 but I see there is a
later version DrComp309)

I haven't tried specifying the root of each drive as the directory, but if
the two are supposed to have identical structures, it should work. It would
be interesting to find out.
 
G

Gerald Ross

Lost_in_sight said:
I have what I believe is a stupidly obvious option for backing up files and
avoiding death by crash. I use two drives on separate machines networked
together. I use identical directory structures on each. I try to save the
files that are newer to the drive with the older version.
Discussions of synchronizing under Help migrate toward using My Briefcase
and updating files from a laptop to a "main" computer. The files move in one
direction only. They do not discuss my situation.
On Win98 I had a Dos protocol that almost worked. By using a copy command
with a switch for copying only the newer file, I could update in both
directions. Still, to have a built in utility that would check and update
both drives would have been preferable. Any hope of this?

I have a large hard drive on my desktop, and simply use windows backup
to backup my notebook over the network.

--
Gerald Ross
Cochran, GA

A bachelor is a selfish, undeserving
guy who has cheated some woman out of
a divorce.
 
T

Trevor L.

Gerald said:
I have a large hard drive on my desktop, and simply use windows backup
to backup my notebook over the network.

Another way is to get an Exact Image progam. I have Paragon Exact Image
(obtained from a PC magazine cover) but there are others.

I wonder do they do anything different from Windows Backup ?
 
R

Richard in Va.

Hello Trevor!

How have you been?
Still using xcopy? Me too, with much success and pleasure! At work, I've been able to
set it up as a scheduled task. It runs everyday at 10:00AM and 2:00PM like a champ.

But there is another program (free) called xxcopy that is supposed to offer more options.
http://www.xxcopy.com/index.htm
I've downloaded it but haven't tried it yet.
It's supposed to synchronizes directories as well.

Sync Toys might be another solution as well.

But I'm still a xcopy fan for now....

The OP indicated he used to use the copy command, maybe with some help he'll be happy with
xcopy as well.

Best regards,

Richard In Va.
+++++++++++++++
 
T

Trevor L.

Richard said:
Hello Trevor!

How have you been?
Still using xcopy? Me too, with much success and pleasure! At work,
I've been able to set it up as a scheduled task. It runs everyday at
10:00AM and 2:00PM like a champ.
But there is another program (free) called xxcopy that is supposed to
offer more options. http://www.xxcopy.com/index.htm
I've downloaded it but haven't tried it yet.
It's supposed to synchronizes directories as well.

Sync Toys might be another solution as well.

But I'm still a xcopy fan for now....

The OP indicated he used to use the copy command, maybe with some
help he'll be happy with xcopy as well.

Best regards,

Richard In Va.
+++++++++++++++

Richard,
Good to hear from you again. Yes, I am well.

Yes, I am still using xcopy, but sometimes a lot of files get moved and
renamed on the C: drive. For example, I (or my wife) download pictures from
a digital camera into a subfolder in "My Pictures" as something like
img001_001, img001_002, etc. (I can't actually remember the naming pattern.)

They get renamed and sorted into various other subfolders as I/we get around
to it. Sometimes this takes a long time if the memory card was full on the
digital camera - I use a 500MB card, my wife uses a 1GB card - her camera
has 5Mp as against mine with 4Mp, so she got the bigger one !! (There can be
about 500 on either.) But if I do a xcopy before that is finished then
img001_001, img001_002, etc. get copied, and later when the renaming is
complete, another xcopy will copy the renamed files as well, resulting in
duplication.

One solution is to delete the folder "My Pictures" from the backup before
using xcopy. Another is to use DirComp which compares two folders, and
allows one to copy in either direction. (This may be similar to Sync Toys,
which I think I downloaded but certainly haven't used - I must check)

I might have a look at xxcopy. If it synchronises directories, it may work
similarly to DirComp (or Sync Toys).
 
R

Richard In Va.

Hello Trevor,

Yes I suppose the lack of synchronization using xcopy can cause problems if
you don't keep up with which files are the good ones. But then, my
mentality has always been that using xcopy as a means of backup in the event
of a catastrophe can be a life saver. So deleting your "My Pictures" folder
on the backup drive 2 or 3 times a year is not really so bad considering
we're using something already built into XP. Hence, maybe considered free.

Xxcopy from what I've read is real similar to using xcopy. It just offers
more switches.

Where do I find DirComp?

Several months ago, towards the end of our last conversation, I took the
liberty to visit your website and I must say you do have quite a photo
collection. Someone has put alot of hard work into that! You've got alot
of history in your albums. I presume many are scanned pictures from your
parents family albums and such. Love the antique automobiles and old homes
and scenic backgrounds. NICE JOB!

How's the wife doing? Tell her your doing a great job preserving all the
family photos!

Best regards,

Richard in Va.

PS: Did you ever get the exclude switch to work the way you wanted?

++++++++++++++++++++++++++++++
 
R

Richard In Va.

Trevor,

Another thought...

Maybe you could have the batch file delete the "My Pictures" folder on the
backup drive prior to executing xcopy.
Or maybe have the batch file copy the backup files on your USB drive to
another location on the USB drive then run xcopy.
Then you will have 2 backup copies of what's really important to you on the
USB drive. One alittle older than the other.

Richard in Va.
++++++++++++
 
T

Trevor L.

Richard,
Thanks for both replies

Yes, I do delete My Pictures periodically, but I like your idea of building
it into the .bat file.

I have actually now tailored the .bat file so that for every folder to be
copied, I ask a question
e.g.
@set /P inp1=Copy Desktop folder (Y/N)?

I then use the answers (inp1, inp2, etc.) in statements such as these:
@if %inp1%==Y @echo Copying Desktop
@if %inp1%==Y xcopy "%USERPROFILE%\Desktop\*.*" "F:\0 C_Backup\Documents
and Settings\Trevor\Desktop" /D /E /C /I /Q /H /R /K /Y

I could do the same for deleting the folder and/or copying it. (Although I
doubt that the copy would be used, it is still insurance.)

I suppose you realise that I am only a home user and so don't have the same
needs as a business. However, there are still a lot of photos on my drive -
the last time I looked, it was 11.2 GB

Yes, I got the exclude switch to work fine. I even added "My Pictures" to it
so I won't create duplicates. I have to remember to take this out when I
have deleted "My Pictures" from the backup.

DirComp is from an obscure Spanish site by Juan M. Aguirregabiria. I am not
sure how up-to-date the site is, but this program has had two versions
released and the latest has copyright date of 2006. This ref:
http://tp.lc.ehu.es/jma/win95.html is the page from which to download
DrComp309 (called Directory Compare) The spelling seems to vary a bit - the
actual .exe file is DirCmp.exe

Yes, most of the work on the photos is my wife's and many are scanned.
Carole (my wife) likes photos of old cars and also most transport - buses
are her big thing. Carole is going well and enjoying pursuing buses, etc.
The old homes, etc. are very hard to find - she has to plead with all her
relatives (and mine) to get these photos to scan and add to the website. We
got some great ones of Wales in 1920s from my (older) cousin on my mother's
side, who lived close to my mother's family from birth until she left
Britain (1960 something) for Australia.

Strange, I am the one with a background in computing, but she is the one
utilising the web to great advantage.
 
R

Richard in Va.

Hello Trevor,

Yes, I should have known... behind every good man, there's a good woman...!

So Carole gets most of the credit...

I like what your doing with the if statements and such. Don't suppose you would be
willing to copy-and-paste your batch file here so I (we) can see the whole thing? Is
there a good online source for looking up the methods. Or maybe a listing of the commands
and parameters and variables that can be used within a batch file.

Anyway.... looks nice.

Glad to know you got something working the way you like. But don't forget to look into
xxcopy.exe. It is supposed to synchronize where xcopy won't.

Maybe I should revisit your web site... it's been awhile.

Take care, tell the wife I said hello from Virginia (USA).

Richard
++++++++++++++++++++++++
 
G

Guest

Trevor L. said:
Another way is to get an Exact Image progam. I have Paragon Exact Image
(obtained from a PC magazine cover) but there are others.

I wonder do they do anything different from Windows Backup ?

The challenge and ideal would be to have a backup program that functions in
Dos. i have used backup in win98 and xp, but I don't see how it will help
recover system files (like restoring the registry) if the system is crashed.

An image program sounds interesting, too, if it functions in Dos, but holds
way more information than is really needed to rebuild a system drive. I
really hunger for a way to store and restore the files that hold the
ephemeral, protected, information, so that after a system crash I can just
copy all the unprotected files and directories, and then restore the files
that really define my system and its state of development.

For example, if I knew that to define my system in its present state of
development I needed to have copies of all .reg, .ini, .def, .etc., files,
and I had a means to return them to their home directories, with a simple
copy command of some kind, I could, I would hope, issue the command, let it
work, and have my system restored after rebooting. no hours of laboriously
reloading the system and software that I use.
 
T

Trevor L.

Lost_in_sight said:
What is the excude command?

I an xcopy command in a batch file, you can add a switch /EXCLUDE:excl.txt
excl.txt contains the names of folders to exclude
e.g.
\My Pictures\
 
G

Guest

Thanks for the conversation about copying and backing up files. You two have
been dealing with the same issues I was facing with xcopy.

I look forward to checking out the products you two have mentioned.

Stephen (Lost_in_sight).
 
G

Guest

Gerald, Using backup is one way to handle the need, but if I could routinely
synchronize two separate partitions, I would not be accumulating huge,
redundant, obsolete files. Anyway, backup files cannot be read in dos (that
I know of). Having duplicate partitions is conceptually the most elegant
solution. The trick is to track changes in directory structure and cause
these changes to be made to the alternate partition.
 
T

Trevor L.

To Richard and anyone else following this thread
Hello Trevor,
I like what your doing with the if statements and such. Don't
suppose you would be willing to copy-and-paste your batch file here
so I (we) can see the whole thing?

My batch file is as follwos. Note that the xcopy commands are actually on
one line, although this may not matter (not sure).
:: backup.bat
:: Remove remarks to copy one-off folders

@setlocal enableextensions
@if errorlevel 1 @echo Unable to enable extensions
@if not errorlevel 1 @echo Extensions enabled
@echo.

@echo Backup selected folders to F: Drive
@echo =======================
@echo NOTE: RESPONSE REQUIRED
@echo =======================
@echo (Do not just Enter)
@echo.
@echo Selected Docs and Settings
@echo --------------------------
@set /P inp1=Copy Desktop folder (Y/N)?
@set /P inp2=Copy Favorites folder (Y/N)?
@set /P inp3=Copy OE folder (Y/N)?
@set /P inp4=Copy Start Menu folder (Y/N)?
@set /P inp5=Copy My Documents folder (Y/N)?
@echo.
@echo Other selected C: Folders
@echo -------------------------
@set /P inp6=Copy Batch Files folder (Y/N)?
@set /P inp7=Copy Downloads folder (Y/N)?
@set /P inp8=Copy Program Files folder (Y/N)?
@echo.

@rem @echo Other one-off selected C: Folders
@rem @echo ---------------------------------
@rem @set /P inp9=Copy Perl folder (Y/N)?
@rem @set /P inp10=Copy XP Pro folder (Y/N)?
@rem @echo.

@if %inp1%==y set inp1=Y
@if %inp2%==y set inp2=Y
@if %inp3%==y set inp3=Y
@if %inp4%==y set inp4=Y
@if %inp5%==y set inp5=Y
@if %inp6%==y set inp6=Y
@if %inp7%==y set inp7=Y
@if %inp8%==y set inp8=Y

@rem @if %inp9%==y set inp9=Y
@rem @if %inp10%==y set inp10=Y

@echo These will be copied
@echo ====================
@if %inp1%==Y @echo Desktop
@if %inp2%==Y @echo Favorites
@if %inp3%==Y @echo OE
@if %inp4%==Y @echo Start Menu
@if %inp5%==Y @echo My Documents
@if %inp6%==Y @echo Batch Files
@if %inp7%==Y @echo Downloads
@if %inp8%==Y @echo Program Files

@rem @if %inp9%==Y @echo Perl
@rem @if %inp10%==Y @echo XP Pro

@echo.
@set /P cont=Continue (Y/N)?
@if %cont%==y set cont=Y
@echo.
@if not %cont%==Y @echo Copy aborted
@if not %cont%==Y goto endbat

@if %inp1%==Y @echo Copying Desktop
@if %inp1%==Y xcopy "%USERPROFILE%\Desktop\*.*" "F:\0 C_Backup\Documents
and Settings\Trevor\Desktop" /D /E /C /I /Q /H /R /K /Y
@echo.

@if %inp2%==Y @echo Copying Favorites
@if %inp2%==Y xcopy "%USERPROFILE%\Favorites\*.*" "F:\0 C_Backup\Documents
and Settings\Trevor\Favorites" /D /E /C /I /Q /H /R /K /Y
@echo.

@if %inp3%==Y @echo Copying OE
@if %inp3%==Y xcopy "%USERPROFILE%\Local Settings\Application
Data\Identities\{83FDBF62-3205-46F3-BAE6-6D4B94BB0594}\Microsoft\Outlook
Express\*.*" "F:\0 C_Backup\Documents and Settings\Trevor\Email" /D /E /C /I
/Q /H /R /K /Y
@echo.

@if %inp4%==Y @echo Copying Start Menu
@if %inp4%==Y xcopy "C:\Documents and Settings\All Users\Start Menu\*.*"
"F:\0 C_Backup\Documents and Settings\All Users\Start Menu\" /D /E /C /I /Q
/H /R /K /Y
@if %inp4%==Y xcopy "%USERPROFILE%\Start Menu\*.*" "F:\0 C_Backup\Documents
and Settings\Trevor\Start Menu" /D /E /C /I /Q /H /R /K /Y

@echo.

@if %inp5%==Y @echo Copying My Documents
@if %inp5%==Y xcopy "%USERPROFILE%\My Documents\*.*" "F:\0
C_Backup\Documents and Settings\Trevor\My Documents" /D /E /C /I /Q /H /R /K
/Y /EXCLUDE:excl.txt
@echo.

@if %inp6%==Y @echo Copying Batch Files
@if %inp6%==Y xcopy "C:\Batch Files\*.*" "F:\0 C_Backup\Batch Files" /D /E
/C /I /Q /H /R /K /Y
@echo.

@if %inp7%==Y @echo Copying Downloads
@if %inp7%==Y xcopy "C:\Downloads\*.*" "F:\0 C_Backup\Downloads" /D /E /C
/I /Q /H /R /K /Y
@echo.

@if %inp8%==Y @echo Copying Program Files
@if %inp8%==Y xcopy "C:\Program Files\*.*" "F:\0 C_Backup\Program Files" /D
/E /C /I /Q /H /R /K /Y
@echo.

@rem @if %inp9%==Y @echo Copying Perl
@rem @if %inp9%==Y xcopy "C:\Perl\*.*" "F:\0 C_Backup\Perl" /D /E /C /I /Q
/H /R /K /Y
@rem @echo.

@rem @if %inp10%==Y @echo Copying XP Pro
@rem @if %inp10%==Y xcopy "C:\XP Pro\*.*" "F:\0 C_Backup\XP Pro" /D /E /C /I
/Q /H /R /K /Y
@rem @echo.

@echo Copy complete
:endbat
@echo.
@pause

My exclude file (excl.txt) is
\My Received Files\
\My Pictures\

This has to vary when I have different needs for copying My Documents
Is there a good online source for looking up the methods. Or maybe a
listing of the commands and
parameters and variables that can be used within a batch file.

Well, I have been searching and I have found a few.
One is The 10 Batch File Commands
http://www.cs.ntu.edu.au/homepages/bea/home/subjects/ith305/description.html

Microsoft also has some references. One is:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true

I also found a document called DOS Command Reference. I can't remember the
source, so I have placed it on
http://tandcl.homemail.com.au/DOS Command Reference.zip
so you can download it within, say the next week (when I will delete it).
Glad to know you got something working the way you like. But don't
forget to look into xxcopy.exe. It is supposed to synchronize where
xcopy won't.

Yes, I have it mind to do.
Maybe I should revisit your web site... it's been awhile.

Well, the main thing that changes are the 5 sites listed under the heading
*Fotopic.Net* on the page "Picture Album". They probably change every day or
three, but not by all that much - it might be 10 -20 on one day and one some
days none at all.
Take care, tell the wife I said hello from Virginia (USA).

Yes, I have. She said that, while she appeciated the compliments on the
site, that I (Trevor) should remember that quite a few of the pictures are
mine. This is true, but she does the hard slog of scanning photos and
putting them up on the web.
 
R

Richard in Va.

Hello Trevor,

Wow, you've got alot going on here. If you don't mind, I'd like to copy-and-paste this
into a file I'll call "TrevorsBatchFile.txt" and use it for reference.

This is the xcopy batch file I use at home...
===========================
C:\Windows\System32\Xcopy.exe "C:\Documents and Settings\Rich\Desktop\*.*" "T:\Backup (C)
WinXP\User Rich\Desktop" /E /D /W /Y /I /R /K
C:\Windows\System32\Xcopy.exe "C:\Documents and Settings\Rich\Favorites\*.*" "T:\Backup
(C) WinXP\User Rich\Favorites" /E /D /Y /I /R /K
C:\Windows\System32\Xcopy.exe "C:\Documents and Settings\Rich\My Documents\*.*" "T:\Backup
(C) WinXP\User Rich\My documents" /E /D /Y /I /R /K
C:\Windows\System32\Xcopy.exe "C:\Documents and Settings\Rich\SendTo\*.*" "T:\Backup (C)
WinXP\User Rich\SendTo" /E /D /Y /I /R /K
C:\Windows\System32\Xcopy.exe "C:\Documents and Settings\Rich\Start Menu\*.*" "T:\Backup
(C) WinXP\User Rich\Start Menu" /E /D /Y /I /R /K
::
::
C:\Windows\System32\Xcopy.exe "E:\*.*" "T:\Backup of (E) Documents" /E /D /W /Y /I /R /K
/EXCLUDE:E:\WinXP-Batch-Files\XcopyExcludeList.txt
===========================

Notice the last line copies everything on drive D:\ to my external drive T:\ under a
folder called "Backup of (E) Documents" maintaining the complete file and folder
structure. Except for one folder on drive E:\ that I don't especially care about. That
folder is defined in the EXCLUDE file "XcopyExcludeList.txt".

My selection of switches varies somewhat from yours tho.

Wondering about my email? Via Outlook Express, I've moved my mail store folders to drive
D:\. If drive C:\ fails, after installing a new HD and the OS, all I'll have to do is
open OE, tell it where the store folder is, close OE, reopen OE and I'm good to go. Also,
I export my mail & news accounts as well as address book to the same location on drive
D:\. All there right together ready to import into OE.

Thanks alot...!

Maybe Stephen (Lost_in_sight) can benefit from this too...!

Richard in Va.
++++++++++++
 
T

Trevor L.

Lost_in_sight said:
For example, if I knew that to define my system in its present state
of development I needed to have copies of all .reg, .ini, .def,
.etc., files, and I had a means to return them to their home
directories, with a simple copy command of some kind, I could, I
would hope, issue the command, let it work, and have my system
restored after rebooting. no hours of laboriously reloading the
system and software that I use.

Lost_in_sight, and Richard in VA if you are watching

I agree entirely, particularly with the registry. I think .ini, .def files
etc, should be on the WINDOWS directory. Or are they on C:\Documents and
Settings\Trevor\Application Data ? (where Trevor is the username)

I have two separate backups on my external drive
One (A) is a copy of the C: drive at a point of time, created with what
imaging software.
The other (B) is a set of selected directories (as per my Batch file which I
posted here)

The idea is that in case of a crash, I would copy the C: drive image back,
and then copy the set of selected directories and then all should be well.

But it won't be because, between A and B, new programs may have been
installed or old ones deleted which amend the registry. These changes will
not be reflected in B, so all will not be the same as at the point B was
taken ;-)

If there were a way to add to B the contents of the directory (and a way to
restore it) then this would be ideal

Does a created System Restore point contain only the directory and if so,
can it be accessed and copied?

BTW,
I am just a home user, so this is not a business-critical issue.
It is just one that I am pursuing:
1. Out of interest
2. To ensure that my system, albeit a small personal one, is as safe as I
can make it.
(After all, if one can find the best tools to use, then why not use them.)
 
T

Trevor L.

Richard,
Yes, I have it mind to do.

I downloaded xxcopy today and installed it (which writes a few files to
C:\Windows\system32, making it available from the command prompt.)
I am hoping that I can now delete the installation files from C:\Downloads.

Here is the text produced by xxcopy /?
XXCOPY == Freeware == Ver 2.92.6 (c)1995-2005 Pixelab, Inc.

XXCOPY src [ dst ] [ options... ]
src specifies the source file(s) or directory to copy
dst specifies the destination directory (no file names)

Option switches start with a slash (/) immediately followed by letter(s).
XXCOPY supports most XCOPY switches (/A/M/P/S/E/T/W/C/I/F/L/H/R/U/K/Y/N).
/S Copies subdirectories /K Keeps file attibutes as in src
/H Copies hidden files also /U Updates files that exist in dst

/CLONE Duplicates a directory (or entire volume) as incremental backup.
/BACKUP Backs up the directory without deleting extra files.
/SG Gathers files from subdirectories into one directory.
/SX Flattens subdirectories into a one-level directory.
/SZ:-<n> Copies files whose size is <n> bytes or less.
/Z Deletes extra files/dirs in the destination (/ZY, without prompt).
/DA:<date> (/DB:<date>) Copies files made on/after (before) the date.
/X<fspec> Excludes file(s) which match <fspec> pattern (wildcard OK).
/Y No prompt on file overwrite (/YY Suppreses nearly all prompts).
/HELP Displays a full help text, (/HELPA in alphabetical order).
/? Displays a focused help text with the switch(es) you specify.
Over 160 switches in all (visit http://www.xxcopy.com for details).

While there are more switches than these, it looks like the /Z switch may be
useful for updatng "My Pictures" on the backup after files have beed moved
and/or renamed on the C: drive.

I don't know whether I dare try it. Of course, I could copy the "My
Pictures" backup to something else, try xxcopy with this switch and compare
the results.

/X<fspec> seems to do the same job as xcopy's /EXCLUDE:excl.txt (which needs
an extra file)

So have you tried xxcopy ?

BTW, the different switches we use in xcopy are
Used by you and not by me:
/W Prompts you to press a key before copying
(I handle this in the batch file - it may easier not to)

Used by me and not by you:
/C Continues copying even if errors occur
(This allows the batch file to keep going)
/Q Does not dislplay filenames when copying
(I handle this in the batch file - again it may be easier not to)
/H Copies hidden and system files also
(This is a matter of choice)
 

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