Hello Thomas,

Sunday, May 16, 2004, 4:17:01 AM, Thomas Andersson wrote:

TA> Is there a way to automate the backup procedure?
TA> I cannot seem to find anything in The Bat! scheduler.

See Roelof's reply per mid:[EMAIL PROTECTED]

TA> Is there a way to use the Windows scheduler or make
TA> The Bat! perform a backup every time I exit the program?

I use a free compression utility called 7-Zip (v 3.13) which you can
download from http://www.7-zip.org/ or
http://sourceforge.net/projects/sevenzip/. I use to do an incremental
backup every time I booted with the Windows Scheduler. I don't believe
TB has a method to call a batch file on exit, so something may have to
created to meet this need, or someone can correct me if I'm wrong. The
nice thing about the batch files is they backup the program directory,
mail base directories, and registry, so everything is backed up from a
working installation.

IIRC I revised an incremental backup Allie posted for rar files to
7-zip's command line version. My present mail base is approximately 890
MB. The incremental backup generally takes 1 to 3 minutes to run
depending upon how much change has occurred in the mail base since the
last time it was run. I'll post the batch file below and you can modify
to your TB configuration.

I also use a grandfather, father, son backup routine which Marck posted
on TBOT. This keeps the grandfather backup and rotates the father / son
backup. It is a complete backup from start to finish, and takes about 20
minutes to run on my PC (P4 2.4 Ghz with 500 MB RAM). I'll post the
batch file below and you can modify to your TB configuration.

If TB has no way to call a batch file on exit, does anybody know how to
create this functionality?

=======================Incremental b/u TB.Bat========================>>
Path C:\Windows;C:\Program Files\7-ZIP;C:\Program Files\The Bat!
regedit /e "X:\TBArchives\tbreg.reg" hkey_current_user\software\rit
copy X:\TBArchives\tbreg.reg
@Echo off
Echo  ************************************************
Echo  * !!  Updating Backup Archive of TB-Mail    !! *
Echo  *      Mail located in X:\AppsBase\MAIL        *
Echo  *   (Mail Base is X:\TBArchives\tbMail7z.7z)   *
Echo  ************************************************
x:
cd x:\
7z u -ms=off x:\TBArchives\tbMail_X_7z.7z -up0q0r2x1y2z1w2 "AppsBase\MAIL\*" -r
Echo  ************************************************
Echo  * !!  Updating Backup Archive of The Bat!   !! *
Echo  * Program located in C:\Program Files\The Bat! *
Echo  *     (Program is X:\TBArchives\tbPgm7z.7z)    *
Echo  ************************************************
c:
cd c:\
7z u -ms=off x:\TBArchives\tbPgm_C_7z.7z -up0q0r2x1y2z1w2 "Program Files\The Bat!\*" -r
x:
cd X:\TBArchives
del tbreg.reg
c:
cd C:\Program Files\The Bat!
del tbreg.reg
=======================Incremental b/u TB.Bat========================<<

=======================Grandfather/Father/Son b/u TBgfs.bat==========>>
Path C:\Windows;C:\Program Files\7-ZIP;C:\Program Files\The Bat!
@Echo off
Echo  ************************************************
Echo  * !!  Updating Backup Archive of The Bat!   !! *
Echo  * Program located in C:\Program Files\The Bat! *
Echo  *     (Program is X:\TBArchives\tbPgmb#.7z)    *
Echo  ************************************************
set dstdir=X:\TBArchives\
set srcdirPm=Program files\The Bat!\
set srcdirMl=AppsBase\MAIL\
set archive=b1
:----------------
:loopPgrm
:----------------
set namePgm=%dstdir%\tbPrgm%archive%.7z
if not exist %namePgm% goto doitPg
if "%archive%"=="b4" goto runoutPg
if "%archive%"=="b3" set archive=b4
if "%archive%"=="b2" set archive=b3
if "%archive%"=="b1" set archive=b2
goto loopPgrm
:----------------
:runoutPg
:----------------
set archive=b1
set namePgm=%dstdir%tbPrgm%archive%.7z
del %namePgm%
:----------------
:doitPg
:----------------
X:
cd %dstdir%
regedit /e "%dstdir%tbreg.reg" hkey_current_user\software\rit
7z a %namePgm% tbreg.reg
C:
cd C:\
7z a %namePgm% "%srcdirPm%*" -r
del %dstdir%tbreg.reg
if "%archive%"=="b4" set archive=b1
if "%archive%"=="b3" set archive=b4
if "%archive%"=="b2" set archive=b3
if "%archive%"=="b1" set archive=b2
set namePgm=%dstdir%\tbPrgm%archive%.7z
del %namePgm%
@Echo off
Echo  ************************************************
Echo  * !!  Updating Backup Archive of TB-Mail    !! *
Echo  *      Mail located in X:\AppsBase\MAIL        *
Echo  *   (Mail Base is X:\TBArchives\tbMailb#.7z)   *
Echo  ************************************************
set archive=b1
:----------------
:loopMail
:----------------
set nameMl=%dstdir%\tbMail%archive%.7z
if not exist %nameMl% goto doitMl
if "%archive%"=="b4" goto runoutMl
if "%archive%"=="b3" set archive=b4
if "%archive%"=="b2" set archive=b3
if "%archive%"=="b1" set archive=b2
goto loopMail
:----------------
:runoutMl
:----------------
set archive=b1
set nameMl=%dstdir%tbMail%archive%.7z
del %nameMl%
:----------------
:doitMl
:----------------
x:
cd x:\
7z a %nameMl% "%srcdirMl%*" -r
if "%archive%"=="b4" set archive=b1
if "%archive%"=="b3" set archive=b4
if "%archive%"=="b2" set archive=b3
if "%archive%"=="b1" set archive=b2
set nameMl=%dstdir%\tbMail%archive%.7z
del %nameMl%
=======================Grandfather/Father/Son b/u TBgfs.bat==========<<

HTH!

-- 
Best Regards,
Greg Strong   

Using The Bat! v2.11 Beta/5 on Windows XP 5.1 Build 2600 Service Pack 1



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

Reply via email to