This example backs up to a local drive; you can just as easily back up to a tape drive or network share. A warning appears if there are hives that must be backed up manually or if there are errors.
c:\> regback c:\backup
saving SECURITY to c:\backup\SECURITY
saving SOFTWARE to c:\backup\software
saving SYSTEM to c:\backup\system
saving .DEFAULT to c:\backup\default
saving SAM to c:\backup\SAM
***Hive = \REGISTRY\USER\S-1-5-21-2127521184-1604012920-1887927527-67705
Stored in file \Device\Volume1\WINNT\Profiles\a-lolag\NTUSER.DAT
Must be backed up manually
regback (filename you choose>) users S-1-5-21-2127521184-1604012920-1887927527-67705
***Hive = \REGISTRY\USER\S-1-5-21-2127521184-1604012920-1887927527-67705_Classes
Stored in file \Device\Volume1\WINNT\Profiles\a-lolag\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat
Must be backed up manually
regback (filename you choose) users S-1-5-21-2127521184-1604012920-1887927527-67705_Classes
User profiles are not automatically backed up. In this example, a user profile (identified in the previous example) is backed up. In addition, the newly-created backup file in the directory where it was created is shown.
c:\> regback c:\backup\user1.bku users S-1-5-21-2127521184-1604012920-1887927527-67705
saving S-1-5-21-2127521184-1604012920-1887927527-67705 to c:\backup\user1.bku
C:\>dir /b \backup
config
default
SAM
SECURITY
software
system
user1.bku
Using RegBack in a batch file and a Windows scheduling service, you can automate registry hive back ups. You can schedule this batch file to run with the AT service or Task Scheduler.
Note
When scheduling this batch, specify an account which has access privileges to the network share. The default System account does not.
The following example batch file assumes you are backing up to a network share that has already been set up, and that you have appropriate privileges to get to this share.
RegBack cannot back up files onto a target folder that already contains files with the same names. Delete all files in the target folder before you attempt a backup. RegBack doesn't back up inactive hives, such as unused user profiles. To back up these hives, use the Copy or XCopy commands.
echo on
rem ... Name: doback.bat
rem ... Purpose: Network backup for Registry files
rem ... Process: Connect to backup share, delete old backup files, copy over new backup files
rem ... Before using this batch file, create a share containing the following directories: backup, config. Set permissions on this share so that appropriate users can run this script.
net use \\myshare\backup
rem --> delete old backups; regback will not copy over an existing file
echo y|del \\myshare\backup\*.*
echo y|del \\myshare\backup\config\*.*
regback \\myshare\backup
regback \\myshare\backup\usr1_ntusr.bku users S-1-5-21-2127521184-1604012920-1887927527-67705
regback \\myshare\backup\usr1_usercls.bku users S-1-5-21-2127521184-1604012920-1887927527-67705_Classes
rem --> add any items that need to be manually backed up
copy %WINDIR% \Config \\myshare\backup\config
net use \\myshare\backup /delete