Amanda-Users

Re: cygwin & spaces in disklist directory

2003-06-11 10:07:40
Subject: Re: cygwin & spaces in disklist directory
From: barryc <barryc AT rjlsystems DOT com>
To: amanda-users AT amanda DOT org
Date: Wed, 11 Jun 2003 09:48:35 -0400 (EDT)
>JC Simonetti wrote:
>Thus there is only one way to backup the loaded hives (and only one to restore
> them): using 2 Windows programs available in the Windows Resource Kit:
>_ regback.exe
>_ regrest.exe
>I cannot join them to this mail since they are not free, you will have to buy
> the Resource Kit to get them...


While I do not condone the circumvention of copyright, you can take advantage 
of 
the fact that many people make entire directory trees web-accessible.  If you 
know the exact filename you're looking for (such as here), search Google for 
the 
string: ` "index of" <filename1> <filename2> ...'  Searching in this manner 
yields 3 sites which have both files.

That having been said, these two programs are unnecessary.  Every version of 
Windows ships with a program called "RegEdit" - the Registry editor.

If you boot to DOS, you can see the usage help by typing `regedit /?'  If you 
actually have the GUI loaded when you try running this command, regedit will 
instead open the GUI window.  

However, assuming you are only interested in backups and restores, here's what 
you want to know:

To backup (export) the entire registry:
`regedit /e <DEST_FILENAME>' - NOTE: <DEST_FILENAME> should end in .reg 
extension.  On my WinXP PRO machine, the exported registry is 23,199,746 bytes.

To import a registry file:
`regedit <SOURCE_FILENAME>'
For every key in <SOURCE_FILENAME>, set the value in the registry to that in 
the 
file.  This command only works if a valid registry exists. (read: the computer 
can at least come up into "safe mode") Any entries which exist in the registry, 
but not in <SOURCE_FILENAME> are preserved.  For a system restore, this is not 
what we want.

To restore the registry:
`regedit /c <SOURCE_FILENAME>'
The `/c' flag tells regedit to create an empty registry (expunge the corrupted 
one) and then fill the new registry with the entries stored in <SOURCE_FILENAME>