complete registry backup from the command line with 'reg save'

Discussion in 'Microsoft Windows 2000 Registry' started by bill, Jun 21, 2007.

  1. bill

    bill Guest

    Hello,


    do the commands (all together)

    reg save HKLM\SOFTWARE c:\test
    reg save HKLM\default c:\test
    reg save HKLM\SAM c:\test
    reg save HKLM\Sytem c:\test
    reg save HKLM\System.alt c:\test


    really save the whole regirstry and why is "HKLM" needed?



    Thank's a lot for any feedback!

    Bill
     
    bill, Jun 21, 2007
    #1
    1. Advertisements

  2. bill wrote:

    > Hello,
    >
    >
    > do the commands (all together)
    >
    > reg save HKLM\SOFTWARE c:\test
    > reg save HKLM\default c:\test
    > reg save HKLM\SAM c:\test
    > reg save HKLM\Sytem c:\test
    > reg save HKLM\System.alt c:\test



    No, you need to specify filenames too. Example:

    reg save HKLM\SOFTWARE c:\test\SOFTWARE
    reg save HKLM\SAM c:\test\SAM

    etc.

    Then you need to change the command for the "default":

    reg save HKU\.default c:\test\default

    > really save the whole regirstry and why is "HKLM" needed?



    If you look at the registry with 'regedit' you will see why. The so
    called "hives" can be under HKEY_LOCAL_MACHINE or HKEY_USERS and you
    need to specify either of these to 'reg save', or the shortened HKLM or HKU.

    --
    Olof Lagerkvist
    ICQ: 724451
    Web: http://here.is/olof
     
    Olof Lagerkvist, Jun 21, 2007
    #2
    1. Advertisements

  3. bill

    Mark V Guest

    In microsoft.public.win2000.registry, bill wrote:

    > Hello,
    >
    >
    > do the commands (all together)
    >
    > reg save HKLM\SOFTWARE c:\test
    > reg save HKLM\default c:\test
    > reg save HKLM\SAM c:\test
    > reg save HKLM\Sytem c:\test
    > reg save HKLM\System.alt c:\test
    >
    >
    > really save the whole regirstry and why is "HKLM" needed?


    Not your topic but you should, if not familiar already, investigate
    ERUNT
    http://www.larshederer.homepage.t-online.de/erunt/

    There is also a set of tools in some Windows Resource Kits (NT4
    ResKit for certain): REGBACK.EXE, REGREST.EXE
     
    Mark V, Jun 21, 2007
    #3
  4. bill

    bill Guest

    On 21 Jun., 18:28, Mark V <> wrote:
    > In microsoft.public.win2000.registry, bill wrote:
    > > Hello,

    >
    > > do the commands (all together)

    >
    > > reg save HKLM\SOFTWARE c:\test
    > > reg save HKLM\default c:\test
    > > reg save HKLM\SAM c:\test
    > > reg save HKLM\Sytem c:\test
    > > reg save HKLM\System.alt c:\test

    >
    > > really save the whole regirstry and why is "HKLM" needed?

    >
    > Not your topic but you should, if not familiar already, investigate
    > ERUNT
    > http://www.larshederer.homepage.t-online.de/erunt/
    >
    > There is also a set of tools in some Windows Resource Kits (NT4
    > ResKit for certain): REGBACK.EXE, REGREST.EXE



    Thank's for the feedback! Browsing in the registry gives me the
    impression, there
    are the following "main keys".. Therefore I tried to backup:


    reg save HKLM\Config c:\regbackup\%date%-Config
    reg save HKLM\Driver c:\regbackup\%date%-Driver
    reg save HKLM\Enum c:\regbackup\%date%-Enum
    reg save HKLM\Hardware c:\regbackup\%date%-Hardware
    reg save HKLM\Network c:\regbackup\%date%-Network
    reg save HKLM\Security c:\regbackup\%date%-security
    reg save HKLM\SOFTWARE c:\regbackup\%date%-software
    reg save HKLM\System c:\regbackup\%date%-system

    reg save HKU\.Default c:\regbackup\%date%-Default
    reg save HKU\Software c:\regbackup\%date%-Software


    But only the following keys could be saved:
    reg save HKLM\Hardware c:\regbackup\%date%-Hardware
    reg save HKLM\SOFTWARE c:\regbackup\%date%-software
    reg save HKLM\System c:\regbackup\%date%-system
    reg save HKU\.Default c:\regbackup\%date%-Default

    The rest of the listed keys were locked(?) and could not be
    accessed...

    Are those files not needed for a complete registry backup?
    If they are needed, how can they be saved from the command line?


    Thank's a lot for any additional help! Bill
     
    bill, Jun 25, 2007
    #4
  5. bill

    Mark V Guest

    In microsoft.public.win2000.registry, bill wrote:

    > On 21 Jun., 18:28, Mark V <> wrote:
    >> In microsoft.public.win2000.registry, bill wrote:
    >> > Hello,

    >>
    >> > do the commands (all together)

    >>
    >> > reg save HKLM\SOFTWARE c:\test
    >> > reg save HKLM\default c:\test
    >> > reg save HKLM\SAM c:\test
    >> > reg save HKLM\Sytem c:\test
    >> > reg save HKLM\System.alt c:\test

    >>
    >> > really save the whole regirstry and why is "HKLM" needed?

    >>
    >> Not your topic but you should, if not familiar already,
    >> investigate ERUNT
    >> http://www.larshederer.homepage.t-online.de/erunt/
    >>
    >> There is also a set of tools in some Windows Resource Kits (NT4
    >> ResKit for certain): REGBACK.EXE, REGREST.EXE

    >
    >
    > Thank's for the feedback! Browsing in the registry gives me the
    > impression, there
    > are the following "main keys".. Therefore I tried to backup:


    < http://www.microsoft.com/technet/archive/winntas/tips/winntmag/in
    reg.mspx?mfr=true > (written for NT4)

    > reg save HKLM\Config c:\regbackup\%date%-Config
    > reg save HKLM\Driver c:\regbackup\%date%-Driver
    > reg save HKLM\Enum c:\regbackup\%date%-Enum
    > reg save HKLM\Hardware c:\regbackup\%date%-Hardware
    > reg save HKLM\Network c:\regbackup\%date%-Network
    > reg save HKLM\Security c:\regbackup\%date%-security
    > reg save HKLM\SOFTWARE c:\regbackup\%date%-software
    > reg save HKLM\System c:\regbackup\%date%-system
    >
    > reg save HKU\.Default c:\regbackup\%date%-Default
    > reg save HKU\Software c:\regbackup\%date%-Software
    >
    >
    > But only the following keys could be saved:
    > reg save HKLM\Hardware c:\regbackup\%date%-Hardware
    > reg save HKLM\SOFTWARE c:\regbackup\%date%-software
    > reg save HKLM\System c:\regbackup\%date%-system
    > reg save HKU\.Default c:\regbackup\%date%-Default
    >
    > The rest of the listed keys were locked(?) and could not be
    > accessed...
    >
    > Are those files not needed for a complete registry backup?
    > If they are needed, how can they be saved from the command line?


    You have not mentioned your OS and all comments here based on W2K.

    A Full Registry Backup means securing a copy of the active hives to
    files on disk. Equivalent to:

    HKEY_LOCAL_MACHINE \SYSTEM
    \winnt\system32\config\system

    HKEY_LOCAL_MACHINE \SAM
    \winnt\system32\config\sam

    HKEY_LOCAL_MACHINE \SECURITY
    \winnt\system32\config\security

    HKEY_LOCAL_MACHINE \SOFTWARE
    \winnt\system32\config\software

    HKEY_USERS \.DEFAULT
    \winnt\system32\config\default


    HKEY_USERS \UserProfile
    Profile; usually under <Documents and Settings>\USERNAME\
    NTUSER.DAT (and UsrClass.dat)


    This is done via Win32 API functions. This is exactly what ERUNT
    does and ERUNT can be run from a CLI. NTBACKUP.EXE can also do
    this via the GUI ("ERD", "Also backup the registry to the repair
    directory. ...") Regback.exe (if available) does the same.


    While it may be possible to use REG.EXE SAVE, I would not know and
    would not use that tool. For me, REG SAVE is the CLI equivalent to
    regedt32.exe "Save key..." (binary) function and intended to save
    the binary copy (with permissions) of a limited sub-key, not an
    entire hive. I would use REG SAVE only for the limited purpose of
    saving a sub-key in binary form from the command line, similar to
    "exporting" a sub-key as text using regedit.exe /e (or /a).


    I suggest you utilize tried and true tools designed and intended
    for the purpose of making Full Registry Backups.
     
    Mark V, Jun 25, 2007
    #5
  6. bill

    bill Guest

    On 25 Jun., 20:29, Mark V <> wrote:
    > In microsoft.public.win2000.registry, bill wrote:
    > > On 21 Jun., 18:28, Mark V <> wrote:
    > >> In microsoft.public.win2000.registry, bill wrote:
    > >> > Hello,

    >
    > >> > do the commands (all together)

    >
    > >> > reg save HKLM\SOFTWARE c:\test
    > >> > reg save HKLM\default c:\test
    > >> > reg save HKLM\SAM c:\test
    > >> > reg save HKLM\Sytem c:\test
    > >> > reg save HKLM\System.alt c:\test

    >
    > >> > really save the whole regirstry and why is "HKLM" needed?

    >
    > >> Not your topic but you should, if not familiar already,
    > >> investigate ERUNT
    > >> http://www.larshederer.homepage.t-online.de/erunt/

    >
    > >> There is also a set of tools in some Windows Resource Kits (NT4
    > >> ResKit for certain): REGBACK.EXE, REGREST.EXE

    >
    > > Thank's for the feedback! Browsing in the registry gives me the
    > > impression, there
    > > are the following "main keys".. Therefore I tried to backup:

    >
    > <http://www.microsoft.com/technet/archive/winntas/tips/winntmag/in
    > reg.mspx?mfr=true > (written for NT4)
    >
    >
    >
    > > reg save HKLM\Config c:\regbackup\%date%-Config
    > > reg save HKLM\Driver c:\regbackup\%date%-Driver
    > > reg save HKLM\Enum c:\regbackup\%date%-Enum
    > > reg save HKLM\Hardware c:\regbackup\%date%-Hardware
    > > reg save HKLM\Network c:\regbackup\%date%-Network
    > > reg save HKLM\Security c:\regbackup\%date%-security
    > > reg save HKLM\SOFTWARE c:\regbackup\%date%-software
    > > reg save HKLM\System c:\regbackup\%date%-system

    >
    > > reg save HKU\.Default c:\regbackup\%date%-Default
    > > reg save HKU\Software c:\regbackup\%date%-Software

    >
    > > But only the following keys could be saved:
    > > reg save HKLM\Hardware c:\regbackup\%date%-Hardware
    > > reg save HKLM\SOFTWARE c:\regbackup\%date%-software
    > > reg save HKLM\System c:\regbackup\%date%-system
    > > reg save HKU\.Default c:\regbackup\%date%-Default

    >
    > > The rest of the listed keys were locked(?) and could not be
    > > accessed...

    >
    > > Are those files not needed for a complete registry backup?
    > > If they are needed, how can they be saved from the command line?

    >
    > You have not mentioned your OS and all comments here based on W2K.
    >
    > A Full Registry Backup means securing a copy of the active hives to
    > files on disk. Equivalent to:
    >
    > HKEY_LOCAL_MACHINE \SYSTEM
    > \winnt\system32\config\system
    >
    > HKEY_LOCAL_MACHINE \SAM
    > \winnt\system32\config\sam
    >
    > HKEY_LOCAL_MACHINE \SECURITY
    > \winnt\system32\config\security
    >
    > HKEY_LOCAL_MACHINE \SOFTWARE
    > \winnt\system32\config\software
    >
    > HKEY_USERS \.DEFAULT
    > \winnt\system32\config\default
    >
    > HKEY_USERS \UserProfile
    > Profile; usually under <Documents and Settings>\USERNAME\
    > NTUSER.DAT (and UsrClass.dat)
    >
    > This is done via Win32 API functions. This is exactly what ERUNT
    > does and ERUNT can be run from a CLI. NTBACKUP.EXE can also do
    > this via the GUI ("ERD", "Also backup the registry to the repair
    > directory. ...") Regback.exe (if available) does the same.
    >
    > While it may be possible to use REG.EXE SAVE, I would not know and
    > would not use that tool. For me, REG SAVE is the CLI equivalent to
    > regedt32.exe "Save key..." (binary) function and intended to save
    > the binary copy (with permissions) of a limited sub-key, not an
    > entire hive. I would use REG SAVE only for the limited purpose of
    > saving a sub-key in binary form from the command line, similar to
    > "exporting" a sub-key as text using regedit.exe /e (or /a).
    >
    > I suggest you utilize tried and true tools designed and intended
    > for the purpose of making Full Registry Backups.



    Thank's a lot for the important tips. I learned a lot! Bill
     
    bill, Jun 29, 2007
    #6
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. regmacc

    W2K Registry references to create a .reg file?

    regmacc, Jul 16, 2003, in forum: Microsoft Windows 2000 Registry
    Replies:
    0
    Views:
    503
    regmacc
    Jul 16, 2003
  2. Mike Kiser

    Adding a TCP/IP port to the registry via reg.exe (REG ADD)

    Mike Kiser, Nov 14, 2003, in forum: Microsoft Windows 2000 Registry
    Replies:
    0
    Views:
    915
    Mike Kiser
    Nov 14, 2003
  3. John

    delete Reg using .reg file

    John, Feb 2, 2004, in forum: Microsoft Windows 2000 Registry
    Replies:
    1
    Views:
    323
    Dave Patrick
    Feb 3, 2004
  4. Guest

    Opening Regedit on remote PC via .reg file or command line

    Guest, Oct 25, 2004, in forum: Microsoft Windows 2000 Registry
    Replies:
    1
    Views:
    1,670
    Mark V
    Oct 25, 2004
  5. bill

    restore registry backup made with regedit /E <PathToSaveFile>.reg

    bill, May 25, 2007, in forum: Microsoft Windows 2000 Registry
    Replies:
    8
    Views:
    1,548
Loading...

Share This Page