Page 1 of 1 1
Topic Options
#135983 - 2005-03-20 09:27 AM SNAPSHOT - System information backup
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
NOTE:!!! Please see the last script posting for the most up to date version of the script.

SNAPSHOT.KIX
 
I was contacted to help someone repair their system that had run an automated CHKDSK when they had rebooted their system.
Apparently the system had a corrupted system file but the entry in the Event viewer did not tell you which file and there was no data in the
.CHK file that was helpful enough to tell you what happened.
Yes there are tools out there that do this already, but thought I'd whip this up in KiXtart and WinZip to create backups that
can later be used with a difference tool to quickly locate and correct the problem.
 
This script will backup important files on your system in order to help you determine what might have changed from one point to another in order to help you more quickly repair your system in the event something were to go wrong at some point in time.
It is sort of a before and after SNAPSHOT of your system. You must have Administrative rights to fully use properly.
In order to be the most helpful it is advisable to run this daily and then burn a copy of the archive files to CD/DVD at least once per month and then delete all the old backups except the main one and start the process all over again.
 
This script requires the following software in order to function properly

KiXtart 4.23
Download KiXtart and extract KIX32.EXE and WKIX32.EXE to your C:\WINDOWS\SYSTEM32 folder so they are available via the path at all times.
 
WinZip 9.0
WinZip Command Line Support Add-On 1.1 SR-1
 
 
WinZip Command Line NOTES:
-ee = extra (enhanced deflate - smallest file)
-r = Recurse into subfolders (include subfolders). This option requires the -p or -P option.
-p|P= Store folder names. A lower case p stores only the names of folders recursed
(subfolders included) via the -r option, while an upper case P stores all folder
information specified on the command line

Example: wzzip.exe -rp Would only contain the child folder names
wzzip.exe -rP Would contain the FULL path and child folder names
 
 
Example output
  • Warning! Each run of this backup will temporarily consume up to 100MB of diskspace or more.
    Once completed the final size will be between 5 to 10MB of diskspace per run.
    After 7 days the main archive will be renamed and a new one started.
    You must decide how many versions to save and when to delete them yourself.
    Press CTRL-C now to abort, otherwise press any other key to continue...

    Backup script start time: 01:28:39

    Please wait while we record a listing of all files on the system...
    Completed recording files and saved to: C:\BACKUP_SYSTEM\2005-03-20_01.28.38_FileListing.txt
    Please wait while we export the registry to: C:\BACKUP_SYSTEM\2005-03-20_01.28.38_RegBackup.txt
    Completed export of the registry
    Please wait while we copy other important files to: C:\BACKUP_SYSTEM\

    Completed copying files to C:\BACKUP_SYSTEM\
    Please wait while we archive all the backup files in C:\BACKUP_SYSTEM\

    WinZip(R) Command Line Support Add-On Version 1.1 SR-1 (Build 6224)
    Copyright (c) WinZip Computing, Inc. 1991-2004 - All Rights Reserved

    Adding BACKUP_SYSTEM\2005-03-20_01.28.38_FileListing.txt
    Adding BACKUP_SYSTEM\2005-03-20_01.28.38_HKCU_RUN.txt
    Adding BACKUP_SYSTEM\2005-03-20_01.28.38_HKLM_RUN.txt
    Adding BACKUP_SYSTEM\2005-03-20_01.28.38_RegBackup.txt
    Adding BACKUP_SYSTEM\2005-03-20_01.28.38_boot.ini
    Adding BACKUP_SYSTEM\2005-03-20_01.28.38_system.ini
    Adding BACKUP_SYSTEM\2005-03-20_01.28.38_win.ini
    creating Zip file C:\BACKUP_SYSTEM\_SystemBackup.zip


    The backup file will be renamed once it reaches over 7 days old. Age of backup file 0

    Completed all backup routines.
    Backup script end time: 01:29:15
    Time to complete backup was: 37 seconds
    Size of backup archive file is: 6,216,712 bytes
    Press a key to continue...

 

Break On
Dim $SO,$Pause
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('WrapAtEOL','On')


Dim $Folder, $File, $Reg, $Age, $Start, $Finish, $OrigAge, $Attrib
$Folder='C:\BACKUP_SYSTEM\'
$File=Join(Split(@DATE,'/'),'-')+'_'+Join(Split(@TIME,':'),'.')
$Reg='_RegBackup.txt'
$Start=@TICKS
COLOR +W/R
'Warning! Each run of this backup will temporarily consume up to 100MB of diskspace or more.' ?
'Once completed the final size will be between 5 to 10MB of diskspace per run. ' ?
'After 7 days the main archive will be renamed and a new one started.' ?
'You must decide how many versions to save and when to delete them yourself.' ??
COLOR +W/B
'Backup script start time: ' + @TIME ??
If Not GetFileAttr($Folder)=16
MD $Folder
EndIf
'Please wait while we record a listing of all files on the system...' ?
SHELL '%comspec% /c DIR C:\ /S >'+$Folder+$File+'_FileListing.txt'
'Completed recording files and saved to: ' + $Folder+$File+'_FileListing.txt' ?
'Please wait while we export the registry to: ' + $Folder+$File+$Reg ?
SHELL 'regedit.exe /e ' + $Folder+$File+$Reg
SHELL 'regedit /e ' + $Folder+$File+'_HKLM_RUN.txt ' +'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
SHELL 'regedit /e ' + $Folder+$File+'_HKCU_RUN.txt ' +'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run'
'Completed export of the registry' ?
'Please wait while we copy other important files to: ' + $Folder ??
COPY '%WINDIR%\win.ini' $Folder+$File+'_win.ini'
COPY '%WINDIR%\system.ini' $Folder+$File+'_system.ini'
$Attrib=SetFileAttr('C:\boot.ini',128)
COPY 'C:\boot.ini' $Folder+$File+'_boot.ini'
$Attrib=SetFileAttr('C:\boot.ini',7)
'Completed copying files to ' $Folder ?
'Please wait while we archive all the backup files in ' + $Folder ??
SHELL 'C:\PROGRA~1\WinZip\WZZIP.EXE -eerP ' + $Folder+'_SystemBackup.zip ' + $Folder+'*.txt ' +
$Folder+'*.ini'
DEL $Folder+'*.txt'
DEL $Folder+'*.ini' /c /f /h
$OrigAge=GetFileTime($Folder+'_SystemBackup.zip')
$Age=DateCalc(@DATE,SubStr(GetFileTime($Folder+'_SystemBackup.zip'),1,10))
?? 'The backup file will be renamed once it reaches over 7 days old. Age of backup file ' Color
+R/W + DateCalc(@DATE,$OrigAge,10) ??
If $Age>7
SHELL '%comspec% /c REN ' + $Folder+'_SystemBackup.zip ' + $File+'_SystemBackup.zip'
EndIf
$Finish=(@TICKS-$Start)
COLOR +W/B
'Completed all backup routines.' ?
'Backup script end time: ' + @TIME ?
'Time to complete backup was: ' + ($Finish/1000) + ' seconds' ?
'Size of backup archive file is: ' + FormatNumber(GetFileSize($Folder+'_SystemBackup.zip'),0,,,-2)
+ ' bytes' ??
COLOR +R/W
'Press any key to end...' ?
Get $Pause
Quit 1


Function DateCalc($date1, $DateOrMod, optional $SingleDigit)
Dim $_intDate1,$_intYear1,$_intMonth1,$_intDay1
Dim $_intDate2,$_intYear2,$_intMonth2,$_intDay2
$date1=Split($date1,'/')
If UBound($date1)<>2
Exit 1
EndIf
$_intYear1 = Val($date1[0])
$_intMonth1 = Val($date1[1])
$_intDay1 = Val($date1[2])
If $_intMonth1 < 3
$_intMonth1 = $_intMonth1 + 12
$_intYear1 = $_intYear1 - 1
EndIf
$_intDate1=$_intDay1+(153*$_intMonth1-457)/5+365*$_intYear1 +
$_intYear1/4-$_intYear1/100+$_intYear1/400-306
Select
Case VarType($DateOrMod)=3
$_intDate2=$_intDate1+$DateOrMod
If InStr($_intDate2,'-')$_intDate2=Val(SubStr($_intDate2,2,len($_intDate2)-1)) EndIf
$_intYear2=(100*(((100*($_intDate2+306)-25)/3652425)-(((100*($_intDate2+306)-25)/3652425)/4))
+(100*($_intDate2+306)-25))/36525
$_intMonth2=(5*(((100*($_intDate2+306)-25)/3652425)-(((100*($_intDate2+306)-25)/3652425)/4)
+($_intDate2+306)-365*$_intYear2-$_intYear2/4)+456)/153
$_intDay2=(((100*($_intDate2+306)-25)/3652425)-(((100*($_intDate2+306)-25)/3652425)/4)
+($_intDate2+306)-365*$_intYear2-$_intYear2/4)-(153*$_intMonth2-457)/5
If $_intMonth2 > 12 $_intYear2=$_intYear2+1 $_intMonth2=$_intMonth2-12 EndIf
If Not $SingleDigit
If Len($_intYear2)< 4
$_=Execute("for $i=1 to 4-len($$_intYear2) $$_intYear2 = '0' + $$_intYear2 next")
EndIf
$_intMonth2=Right("0" + $_intMonth2,2)
$_intDay2=Right("0" + $_intDay2,2)
EndIf
$DateCalc=$_intYear2+'/'+$_intMonth2+'/'+$_intDay2
Case VarType($DateOrMod)=8
$DateOrMod=Split($DateOrMod,'/')
If UBound($DateOrMod)<>2
Exit 1
EndIf
$_intYear2 = Val($DateOrMod[0])
$_intMonth2 = Val($DateOrMod[1])
$_intDay2 = Val($DateOrMod[2])
If $_intMonth2 < 3
$_intMonth2 = $_intMonth2+12
$_intYear2 = $_intYear2-1
EndIf
$_intDate2=$_intDay2+(153*$_intMonth2-457)/5+365*$_intYear2 +
$_intYear2/4-$_intYear2/100+$_intYear2/400-306
$DateCalc=$_intDate1-$_intDate2
;comment the next line if you wish to return negative results also !!!
If InStr($DateCalc,'-') $DateCalc = Val(SubStr($DateCalc,2,Len($DateCalc)-1)) EndIf
Case 1
Exit 1
EndSelect
EndFunction



Top
#135984 - 2005-03-25 12:37 PM Re: SNAPSHOT - System information backup
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Well after someone wrote and complained that the script did not work (turned out they had not installed the WinZip Command Line app as told to), and speaking with Lonkero about the archiving program I rewrote this script to take advantage of the archiving program 7-Zip.

You can download the full GUI version here. Welcome to the 7-Zip Home! another good change in this script is that 7-Zip reduces the overall size of the archive by almost 50% compared to using WinZip and it's FREE to use.

7-Zip is free software distributed under the GNU LGPL

This updated script now does the following:
  • Checks if user has Admin rights and quits if not
  • Checks if there is at least 125MB of free space and quits if not
  • Automatically creates the C:\7ZA\ folder and downloads the 7z command line program 7za415b.exe
  • Extracts the file 7za415b.exe to the C:\7ZA\ folder
  • Automatically creates the C:\BACKUP_SYSTEM\ folder
  • List all files on the system via DIR C:\ /S
  • Exports the entire Registry to a text file
  • Copies BOOT.INI, WIN.INI, SYSTEM.INI to the archive
  • List all running services
  • net statistics workstation
  • net statistics server
  • netstat -a Active Connections
  • netstat -r Routing Table
  • nbtstat -S Sessions
  • net config workstation
  • proxycfg WinHTTP Default Proxy
  • Uses 7z command line app with maximum compression and archives all files above into the archive
  • Alerts the user when there are more then 7 archive files in the folder.


You can use the GUI version of 7z to review the files within the archive. WinRAR can also open this file format.

NOTE: This script has only been tested with KiX32 v4.22 and Windows XP English w/SP2
It has not been tested on Windows 2000 yet, but it should work on 2000 as well.


Sample Output
  • Warning! Each run of this backup will temporarily consume up to 100MB of diskspace or more.
    Once completed the final size will be between 5 to 10MB of diskspace per run.
    You must decide how many versions to save and when to delete them yourself.

    Backup script start time: 03:21:54

    Please wait while we record a listing of all files on the system...
    Completed recording files and saved to: C:\BACKUP_SYSTEM\2005-03-25_03.21.54_FileListing.txt
    Please wait while we export the registry to: C:\BACKUP_SYSTEM\2005-03-25_03.21.54_RegistryBackup.txt
    Completed export of the registry
    Please wait while we copy other important files to: C:\BACKUP_SYSTEM\

    Completed copying files to C:\BACKUP_SYSTEM\
    Please wait while we archive all the backup files in C:\BACKUP_SYSTEM\


    7-Zip (A) 4.15 beta Copyright (c) 1999-2005 Igor Pavlov 2005-01-25
    Scanning

    Creating archive C:\BACKUP_SYSTEM\_SystemBackup.7z

    Compressing 2005-03-25_03.21.54_boot.ini
    Compressing 2005-03-25_03.21.54_system.ini
    Compressing 2005-03-25_03.21.54_win.ini
    Compressing 2005-03-25_03.21.54_ActiveConnections.txt
    Compressing 2005-03-25_03.21.54_DefaultProxy.txt
    Compressing 2005-03-25_03.21.54_FileListing.txt
    Compressing 2005-03-25_03.21.54_NetworkServerStats.txt
    Compressing 2005-03-25_03.21.54_NetworkWorkstationStats.txt
    Compressing 2005-03-25_03.21.54_RegistryBackup.txt
    Compressing 2005-03-25_03.21.54_RouteTable.txt
    Compressing 2005-03-25_03.21.54_RunningServices.txt
    Compressing 2005-03-25_03.21.54_Sessions.txt
    Compressing 2005-03-25_03.21.54_WorkStationConfig.txt

    Everything is Ok


    The backup file will be renamed once it reaches over 7 days old. Age of backup file 0

    Completed all backup routines.
    Backup script end time: 03:23:27
    Time to complete backup was: 93 seconds
    Size of backup archive file is: 3,187,429 bytes

    Press any key to end...


Break On
Dim $SO,$Pause
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('WrapAtEOL','On')


Dim $Folder, $File, $Reg, $Age, $Start, $Finish, $OrigAge, $Attrib
Dim $URL, $Target, $GetFile, $7zFolder, $Space, $Admin,$Archives
$Admin=IIf(InGroup(@WKSTA+'\'+SidToName('S-1-5-32-544'))-1+@INWIN=1,'Yes','No')
If $Admin='No'
? 'You must have local Admin rights to run this script...'
Quit 5
EndIf
$Space=GetDiskSpace('c:')
If $Space<'125000'
? 'System does not appear to have enough space to run the backup'
Quit 112
EndIf
$7zFolder='C:\7ZA\'
If Not GetFileAttr($7zFolder)=16
MD $7zFolder
If @ERROR ? 'Error creating '+ $7zFolder QUIT @ERROR EndIf
EndIf
$URL='http://www.kixhelp.com/Downloads/7za415b.exe'
$Target=$7zFolder+'7za415b.exe'
If GetFileVersion('C:\7ZA\7za.exe','BinFileVersion')<'4.15.0.0'
$GetFile=FTPget($URL, $Target)
If GetFileVersion($Target,'BinFileVersion')<'4.15.0.0'
? 'Error getting 7z file to create archives...'
Quit 3
Else
SHELL $Target + ' -y'
DEL $Target
EndIf
EndIf
$Folder='C:\BACKUP_SYSTEM\'
$File=Join(Split(@DATE,'/'),'-')+'_'+Join(Split(@TIME,':'),'.')
$Reg='_RegistryBackup.txt'
$Start=@TICKS
COLOR +W/R
'Warning! Each run of this backup will temporarily consume up to 100MB of diskspace or more.' ?
'Once completed the final size will be between 5 to 10MB of diskspace per run. ' ?
'You must decide how many versions to save and when to delete them yourself.' ??
COLOR +W/B
'Backup script start time: ' + @TIME ??
If Not GetFileAttr($Folder)=16
MD $Folder
If @ERROR ? 'Error creating '+ $Folder QUIT @ERROR EndIf
EndIf
$Archives = CountFiles($Folder,'*.7z') ; Check to see how many archive files exist
? 'There are ' + $Archives + ' archive files in the folder.' ?
If $Archives > 7 ; If more then 7 files exist then print out message
? 'Warning... There are now more then 7 archive files in the ' + $Folder + ' directory. '
? 'You should consider cleaning up or moving some to a CD or DVD' ?
EndIf
'Please wait while we record a listing of all files on the system...' ?
SHELL '%comspec% /c DIR C:\ /S >'+$Folder+$File+'_FileListing.txt'
SHELL '%comspec% /c net start >'+$Folder+$File+'_RunningServices.txt'
SHELL '%comspec% /c net statistics workstation >'+$Folder+$File+'_NetworkWorkstationStats.txt'
SHELL '%comspec% /c net statistics server >'+$Folder+$File+'_NetworkServerStats.txt'
SHELL '%comspec% /c netstat -a >'+$Folder+$File+'_ActiveConnections.txt'
SHELL '%comspec% /c netstat -r >'+$Folder+$File+'_RouteTable.txt'
SHELL '%comspec% /c nbtstat -S >'+$Folder+$File+'_Sessions.txt'
SHELL '%comspec% /c proxycfg >'+$Folder+$File+'_DefaultProxy.txt'
SHELL '%comspec% /c net config workstation >'+$Folder+$File+'_WorkStationConfig.txt'
'Completed recording files and saved to: ' + $Folder+$File+'_FileListing.txt' ?
'Please wait while we export the registry to: ' + $Folder+$File+$Reg ?
SHELL 'regedit.exe /e ' + $Folder+$File+$Reg
SHELL 'regedit /e ' + $Folder+$File+'_HKLM_RUN.txt ' +'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
SHELL 'regedit /e ' + $Folder+$File+'_HKCU_RUN.txt ' +'HKCU\Software\Microsoft\Windows\CurrentVersion\Run'
'Completed export of the registry' ?
'Please wait while we copy other important files to: ' + $Folder ??
COPY '%WINDIR%\win.ini' $Folder+$File+'_win.ini'
COPY '%WINDIR%\system.ini' $Folder+$File+'_system.ini'
$Attrib=SetFileAttr('C:\boot.ini',128)
COPY 'C:\boot.ini' $Folder+$File+'_boot.ini'
$Attrib=SetFileAttr('C:\boot.ini',7)
'Completed copying files to ' $Folder ?
'Please wait while we archive all the backup files in ' + $Folder ??
SHELL 'C:\7ZA\7za.exe'+' a -t7z '+$Folder+$File+'_SystemBackup.7z '+$Folder+'*.txt '+$Folder+'*.ini'+' -mx9'
DEL $Folder+'*.txt'
DEL $Folder+'*.ini' /c /f /h
$Finish=(@TICKS-$Start)
COLOR +W/B
'Completed all backup routines.' ?
'Backup script end time: ' + @TIME ?
'Time to complete backup was: ' + ($Finish/1000) + ' seconds' ?
'Size of backup archive file is: ' + FormatNumber(GetFileSize($Folder+$File+'_SystemBackup.7z'),0,,,-2)+' bytes' ??
COLOR +R/W
'Press any key to end...' ?
Get $Pause
Quit 1


Function CountFiles($Folder,$Type)
Dim $Index,$File
$Index = 0
$File = Dir($Folder+'\'+$Type)
While @ERROR = 0
If Not (GetFileAttr($File) & 16)
$Index = $Index + 1
EndIf
$File = Dir()
Loop
$CountFiles=$Index
EndFunction


Function DateCalc($date1, $DateOrMod, optional $SingleDigit)
Dim $_intDate1,$_intYear1,$_intMonth1,$_intDay1
Dim $_intDate2,$_intYear2,$_intMonth2,$_intDay2
$date1=Split($date1,'/')
If UBound($date1)<>2
Exit 1
EndIf
$_intYear1 = Val($date1[0])
$_intMonth1 = Val($date1[1])
$_intDay1 = Val($date1[2])
If $_intMonth1 < 3
$_intMonth1 = $_intMonth1 + 12
$_intYear1 = $_intYear1 - 1
EndIf
$_intDate1=$_intDay1+(153*$_intMonth1-457)/5+365*$_intYear1 +
$_intYear1/4-$_intYear1/100+$_intYear1/400-306
Select
Case VarType($DateOrMod)=3
$_intDate2=$_intDate1+$DateOrMod
If InStr($_intDate2,'-')$_intDate2=Val(SubStr($_intDate2,2,len($_intDate2)-1)) EndIf
$_intYear2=(100*(((100*($_intDate2+306)-25)/3652425)-(((100*($_intDate2+306)-25)/3652425)/4))
+(100*($_intDate2+306)-25))/36525
$_intMonth2=(5*(((100*($_intDate2+306)-25)/3652425)-(((100*($_intDate2+306)-25)/3652425)/4)
+($_intDate2+306)-365*$_intYear2-$_intYear2/4)+456)/153
$_intDay2=(((100*($_intDate2+306)-25)/3652425)-(((100*($_intDate2+306)-25)/3652425)/4)
+($_intDate2+306)-365*$_intYear2-$_intYear2/4)-(153*$_intMonth2-457)/5
If $_intMonth2 > 12 $_intYear2=$_intYear2+1 $_intMonth2=$_intMonth2-12 EndIf
If Not $SingleDigit
If Len($_intYear2)< 4
$_=Execute("for $i=1 to 4-len($$_intYear2) $$_intYear2 = '0' + $$_intYear2 next")
EndIf
$_intMonth2=Right("0" + $_intMonth2,2)
$_intDay2=Right("0" + $_intDay2,2)
EndIf
$DateCalc=$_intYear2+'/'+$_intMonth2+'/'+$_intDay2
Case VarType($DateOrMod)=8
$DateOrMod=Split($DateOrMod,'/')
If UBound($DateOrMod)<>2
Exit 1
EndIf
$_intYear2 = Val($DateOrMod[0])
$_intMonth2 = Val($DateOrMod[1])
$_intDay2 = Val($DateOrMod[2])
If $_intMonth2 < 3
$_intMonth2 = $_intMonth2+12
$_intYear2 = $_intYear2-1
EndIf
$_intDate2=$_intDay2+(153*$_intMonth2-457)/5+365*$_intYear2 +
$_intYear2/4-$_intYear2/100+$_intYear2/400-306
$DateCalc=$_intDate1-$_intDate2
;comment the next line if you wish to return negative results also !!!
If InStr($DateCalc,'-') $DateCalc = Val(SubStr($DateCalc,2,Len($DateCalc)-1)) EndIf
Case 1
Exit 1
EndSelect
EndFunction




Function FTPget($sURL, $sTargetFile, optional $sUser, optional $sPass)
Dim $oFTP, $oStream
$sUser=""+$sUser
$oFTP = CreateObject("Microsoft.XMLHTTP")
if @error $ftpget=1 exit 1 endif
$oStream = CreateObject("ADODB.Stream")
if @error $ftpget=2 exit 2 endif
if $sUser
$oFTP.Open("GET", $sURL, not 1, $sUser, $sPass)
else
$oFTP.Open("GET", $sURL, not 1)
endif
if @error $ftpget=3 exit 3 endif
$oFTP.Send
$oStream.Type = 1
$oStream.Mode = 3
$oStream.open
$oStream.Write($oFTP.responseBody)
if @error $ftpget=4 exit 4 endif
$oStream.SaveToFile($sTargetFile, 2)
if @error $ftpget=5 exit 5 endif
$oStream.Close
EndFunction




Edited by NTDOC (2005-04-05 02:39 AM)

Top
#135985 - 2005-03-25 03:50 PM Re: SNAPSHOT - System information backup
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
something weird I can't understand.
why need to check 125M of free space if we only use 3?

why dowloading an exe and extracting?
you have some package there?
afaik, 7zip, zip, rar, arj... all have commandline tools that don't need no installation.
_________________________
!

download KiXnet

Top
#135986 - 2005-03-25 07:07 PM Re: SNAPSHOT - System information backup
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Need to check for 125MB of free space because if you had read the original post for the Example output or within the script it'self it would show that during the process it will use 100MB or more of space. Then the data gets archived and I delete the temporary files created during the process which leaves us with only the archived file.
As an example 2 of my systems export the registry file at around 75-80MB plus the directory listing of about 8MB. But each system this is ran on will be different.

Quote:

Warning! Each run of this backup will temporarily consume up to 100MB of diskspace or more.
Once completed the final size will be between 5 to 10MB of diskspace per run.




The install is not really an "install" in the normal sense, but I needed a method to confirm you have the command line version of 7-Zip and where it's located. So this checks if you have it in C:\7ZA and if not it then downloads it and extracts it there to use.

Top
#135987 - 2005-04-05 02:44 AM Re: SNAPSHOT - System information backup
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
I've updated the script to correct a methodology issue.

The script was always saving/updating the same file which updates the date each time, which invalidates checking the time the file was last updated.

Now the script creates a new file every time it's run. Once the script detects there are more then 7 archive files in the folder it will print out that message.

If you want to automate the log management please review these links for more information.

How to archive a file by Richard H.

Log Management by Glenn B.

Top
#135988 - 2005-05-04 07:31 PM Re: SNAPSHOT - System information backup
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Might want to add the %windows%\repair folder to the list of saved items, and may add the recent DLL UDF to help quickly check DLLs added/removed recently instead of the entire file system check which can be done but would take longer. Often spyware/trojans/worms add new DLL and Process which a compare will help to remove.
Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 934 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.062 seconds in which 0.032 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org