Hi

Having read a couple of previous threads on the subject, I intend
to use the following batch files to automate backing up of TB!'s
registry entries and mail and program directories.

Have I missed anything?
Have I included anything I shouldn't?
Could I make it work faster?


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@Echo on
::
@Echo  *************************************************************
@Echo  *************************************************************
@Echo  **     Begin TB Backup Batch File (Name: TBBackup.bat)     **
@Echo  *************************************************************
@Echo  *************************************************************
::
:: Creates rotating "Grandfather,Father, Son" backups of The Bat! using 7-Zip.
::
Path %SystemRoot%;%programfiles%\7-ZIP
:: Echo off
::Echo on
@Echo  *********************************
@Echo  *********************************
@Echo  **     Copy Registry Key       **
@Echo  **   To Program Directory      **
@Echo  *********************************
@Echo  *********************************
::
cd %SystemRoot%
::
regedit /e "%programfiles%\The Bat!\TB.REG.txt" 
"HKEY_CURRENT_USER\Software\RIT\The Bat!"
::
::
@Echo  **********************************
@Echo  **********************************
@Echo  **   Backup Program Directory   **
@Echo  **********************************
@Echo  **********************************
::
cd %programfiles%\7-Zip\
::
7z u -ms=off d:\TheBatBackups\TBbkup\TB_Program_Directory.7z -up0q0r2x1y2z1w2 
"%programfiles%\The Bat!\*" -r
::
::
@Echo  *********************************
@Echo  *********************************
@Echo  **    Backup Mail Directory    **
@Echo  *********************************
@Echo  *********************************
::
cd %programfiles%\7-Zip\
::
7z u -ms=off d:\TheBatBackups\TBbkup\TB_Mail_Directory.7z -up0q0r2x1y2z1w2 
"%appdata%\The Bat!\*" -r
::
::
@Echo  *******************************************
@Echo  *******************************************
@Echo  **    Rotate Grandfather, Father, Son    **
@Echo  *******************************************
@Echo  *******************************************
::
cd d:\TheBatBackups\
::
move /y d:\TheBatBackups\TBbkup2\TB_Mail_Directory.7z d:\TheBatBackups\TBbkup3\
move /y d:\TheBatBackups\TBbkup2\TB_Program_Directory.7z 
d:\TheBatBackups\TBbkup3\
::
move /y d:\TheBatBackups\TBbkup1\TB_Mail_Directory.7z d:\TheBatBackups\TBbkup2
move /y d:\TheBatBackups\TBbkup1\TB_Program_Directory.7z 
d:\TheBatBackups\TBbkup2
::
copy /y d:\TheBatBackups\TBbkup\TB_Mail_Directory.7z d:\TheBatBackups\TBbkup1
copy /y d:\TheBatBackups\TBbkup\TB_Program_Directory.7z d:\TheBatBackups\TBbkup1
::
::
cd %USERPROFILE%
::
@Echo  ***********************************************************
@Echo  ***********************************************************
@Echo  **     End TB Backup Batch File (Name: TBBackup.bat)     **
@Echo  ***********************************************************
@Echo  ***********************************************************


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

::----------------- Batch File TB Shortcut (Name: TBStart.bat) ------>>
::
:: This runs The Bat! then calls the batch file to backup The Bat!
::
:: THIS batch file MUST be run from a shortcut that is set to start in The 
Bat!'s program directory
:: otherwise the backup will not wait until you exit TB!
::
::
"%programfiles%\The Bat!\thebat.exe" /FOCUSU="Mike (Using The Bat!)"
::
Call TBBackup.bat

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

I find that TBBackup.bat takes about 14 minutes when I have just
received a couple of hundred messages in a single Bat! session
(over 12 minutes to backup the mail directory and about 50 seconds
to copy the backup of the mail directory to
d:\TheBatBackups\TBbkup1).

If I then use TBStart.bat to open The Bat! but I immediately close
TB! the 12 minutes to backup the mail directory reduces to about 4
minutes, making a total time to run TBBackup.bat of a little under
6 minutes.

If I run TBBackup.bat without starting The Bat! since the backup
was last ran, the 12 or 4 minutes reduces to just under 2 minutes,
making a total time of about 3 and a half minutes.

Copying the backup of the mail directory to
d:\TheBatBackups\TBbkup1 always takes 45 to 50 seconds.

My TB! program directory is 13.4 MB and mail directory is 1.1GB
(30k messages spread between about 80 folders and 5 accounts).

The program backup is 5.4 MB and the mail backup is 486 MB.

Any help / suggestions would be appreciated.

-- 
Best regards,

MFPA                       

Zorba the Greek - before he zorbas you

Using The Bat! v3.0.1.33 on Windows XP 5.1 Build 2600 Service Pack 1


________________________________________________
Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to