Re: Automating backup?

2004-05-30 Thread Greg Strong
Hello Thomas,

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

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

Yes is the short answer. The batch file below will create a rotating
grandfather, father, and son backup. You may want to copy one set of the
backup files (i.e. program  mail base either in zip or 7z format) to
another name to create a base line set of files.

So here is what I did.

1) Need a compression utility with command line capability.  I used
   7-Zip, http://www.7-zip.org/, other have used WinRar. 7-Zip is a FREE
   compression utility. I've test it successfully many times. It has
   saved my bacon sort to speak a few times.

2) Placed copy of the backup batch file in program directory.  It is
   important to understand this backup batch file backs up all 3
   critical areas of TB which are the program directory, the mail
   directory, and RIT registry in windows.  Depending upon what OS you
   are using (i.e. NT version) you may have to provide additional rights
   to the user to facilitate backing up ALL 3 critical areas. I use 2
   types of users on WinXP Pro which are admin and limited user
   belonging to power user group. See the batch file below.

3) Create a shortcut to a batch file which starts TB and the backup
   batch file created in #2 above. It is important that in the shortcut
   properties in start in you put the program directory of TB
   otherwise TB will run concurrently with the backup. You don't want
   the backup to start until you exit which the start in issue clears
   up. See the batch file below.

Thanks to Marck I've made some changes to his batch file to coincide
with my configuration of having my TB program and mail base on separate
partitions/drives. I should also state there were some other nuances in
Marck's batch file that did not work for me. This maybe how my PC's
configured or who knows (ie. my mistake?). I believe Lief also provided
some help on programs running concurrently. IIRC Marck's batch creates a
base line grandfather which does NOT change.  I didn't like this logic
because I wanted the rotating version of the grandfather/father/son
backup.

In response to Marck I should also comment up front that I use the 7z
compression format rather than the zip format used in Marck's batch
file. So depending upon which compression utility you use you will have
to make the appropriate changes to the batch file. Some people use
Winrar where I used 7-Zip which is a free compression utility available
on the web at http://www.7-zip.org/. Using the 7-Zip compression utility
using the UPDATE feature on a mail base of approximately 910 MB and 10
MB of program directory took approximately 4 minutes to do an
incremental backup which facilitates backing up on exit. I tested the
batch by deleting all remnants of TB from system (ie. program directory,
mail directory,  registry) and restoring which also took about 4
minutes on the 910 MB mail base. These times can vary depending upon the
change in the mail base.

I believe I left echo on as provided by Marck in his original version.
However you may want to turn it off after you are confident any changes
made work properly for your configuration of TB on your PC. I am the
only users on this PC, however IIRC for newer users who have recently
installed TB with multiple profiles I believe the mail base changes for
each user.  So multiple versions of the shortcut and backup file will be
required for each user on a PC that desires a backup.

--#2 Incremental TB Backup Batch File (Name: TBigfs.bat)-
cd \
Path C:\Windows;C:\Program Files\7-ZIP
rem Echo off
Echo on
Echo  ***
Echo  *!! Updating Backup !!*
Echo  * !! Archive of TB-Program !! *
Echo  ***
rem set archiver=C:\Program Files\7-Zip\7z.exe
set drvPm=c:
set drvBU=x:
set dstdir=TBArchives\
set srcdirPM=Program files\The Bat!\
set srcdirMl=AppsBase\MAIL\
set archive=b1
:
:loopPgrm
set namePgm=%dstdir%tbIcPm%archive%.7z
if not exist %drvBU%\%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 archDel=b1
set nameDel=%dstdir%tbIcPm%archDel%.7z
del %drvBU%\%nameDel%
:
:doitPg
regedit /e %drvPm%\%srcdirPM%tbreg.reg hkey_current_user\software\rit
cd \
if %archive%==b4 set prev=b3
if %archive%==b3 set prev=b2
if %archive%==b2 set prev=b1
if %archive%==b1 set prev=b4

%drvPm%
cd \

copy %drvBU%\%dstdir%tbIcPm%prev%.7z %drvBU%\%namePgm%
7z u -ms=off %drvBU%\%namePgm% -up0q0r2x1y2z1w2 %srcdirPM%* -r
%drvPm%
cd %srcdirPM%
del tbreg.reg
cd \

if %archive%==b4 set archDel=b1
if %archive%==b3 set archDel=b4
if %archive%==b2 set archDel=b3
if %archive%==b1 set archDel=b2
set namePgm=%drvBU%\%dstdir%tbIcPm%archDel%.7z
del %namePgm%

%drvBU%
cd \

cd %srcdirMl%
Echo  

Re: Automating backup?

2004-05-17 Thread Adam
Hello Greg,

Sunday, May 16, 2004, 10:00:15 PM, you wrote:

GS I am not running notepad. I'm running 7-Zip command line interface.

Just simplifying example to a bare minimum.

A And running it at the command line, should leave The Bat! application
A running, the Command Prompt window still running, and it will await
A you until The Bat! closes.

GS My tests were in sharp contrast to this last statement. 7-Zip continued
GS to run the backup from the command line WHILE TB was open, and did NOT
GS wait until TB closed.

Sorry then. I can't duplicate that effect on any OS I tried.

Unless you mean that you started TB yourself. And then ran the exact backup
file you posted. In which case, the presumed question I am guessing may
be, how to tell if TB was running, and quit it. Which is not the same question
as I followed from this thread.

-- 
Best regards,
 Adam 



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


Automating backup?

2004-05-16 Thread Thomas Andersson
Hi list!

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

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

Thanks to all the listees who helped me with [EMAIL PROTECTED] You
can see the reslult below!

Cheers
Thomas
-- 
Thomas Andersson - Sweden
Email: [EMAIL PROTECTED]
Running The Bat! 2.10.03
on Windows XP Build number 2600 Service Pack 1

Running [EMAIL PROTECTED] (www.setiathome.ssl.berkeley.edu)
   No of SETI units returned: 319
   Processing time: 142 days, 23 hours.



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0420-4, 2004-05-14
Tested on: 2004-05-16 11:17:03
avast! is copyright (c) 2000-2003 ALWIL Software.
http://www.avast.com





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


Re: Automating backup?

2004-05-16 Thread Roelof Otten
Hallo Thomas,

On Sun, 16 May 2004 11:17:01 +0200GMT (16-5-04, 11:17 +0200, where I
live), you wrote:

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

Not yet, IIRC it's been promised, but that doesn't any good right now.

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

There are some list member using an automated back-up, but that's
using a third party program, like rar or zip. What's handy in such
cases is to export the register settings for TB to a file on disk.
That can be done with this command:
C:\windows\regedit.exe /e C:\TheBat.reg HKEY_CURRENT_USER\SOFTWARE\RIT
The rest is up to you.

-- 
Groetjes, Roelof

Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies 
or rabbits.



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


Re: Automating backup?

2004-05-16 Thread Greg Strong
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 

Re: Automating backup?

2004-05-16 Thread Adam
Hello Greg,

Sunday, May 16, 2004, 2:11:50 PM, you wrote:

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

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

No problem. TB is just one program in your batch file. Put it at the
top, and the rest of the commands will run along after.

What was the Subject of the original discussion on Tbot?

GS ===Incremental b/u TB.Bat
GS Path C:\Windows;C:\Program Files\7-ZIP;C:\Program Files\The Bat!
GS regedit /e X:\TBArchives\tbreg.reg hkey_current_user\software\rit
GS copy X:\TBArchives\tbreg.reg

This can't be from a working batch file. Since many of your pathnames
are not quoted. So the later ones should fail.

GS @Echo off
GS Echo  
GS Echo  * !!  Updating Backup Archive of TB-Mail!! *
GS Echo  *  Mail located in X:\AppsBase\MAIL*
GS Echo  *   (Mail Base is X:\TBArchives\tbMail7z.7z)   *
GS Echo  
GS x:
GS cd x:\
GS 7z u -ms=off x:\TBArchives\tbMail_X_7z.7z -up0q0r2x1y2z1w2 AppsBase\MAIL\* -r

What would be the meaning of this part?

-- 
Best regards,
 Adam 



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


Re: Automating backup?

2004-05-16 Thread Greg Strong
Hello Adam,

Sunday, May 16, 2004, 1:51:21 PM, Adam wrote:

... snip

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

A No problem. TB is just one program in your batch file. Put it at the
A top, and the rest of the commands will run along after.

I want to run the batch file AFTER TB exits not after I start TB.

A What was the Subject of the original discussion on Tbot?

Re: c0t0d0s0, WAS: Re: EULAs etc...

per mid:[EMAIL PROTECTED]

GS ===Incremental b/u
GS TB.Bat
GS Path C:\Windows;C:\Program Files\7-ZIP;C:\Program Files\The Bat!
GS regedit /e X:\TBArchives\tbreg.reg hkey_current_user\software\rit
GS copy X:\TBArchives\tbreg.reg

A This can't be from a working batch file. Since many of your pathnames
A are not quoted. So the later ones should fail.

You are correct on the copy X:\TBArchives\tbreg.reg everything else
seems to be working fine.

GS @Echo off
GS Echo  
GS Echo  * !!  Updating Backup Archive of TB-Mail!! *
GS Echo  *  Mail located in X:\AppsBase\MAIL*
GS Echo  *   (Mail Base is X:\TBArchives\tbMail7z.7z)   *
GS Echo  
GS x:
GS cd x:\
GS 7z u -ms=off x:\TBArchives\tbMail_X_7z.7z -up0q0r2x1y2z1w2 AppsBase\MAIL\* -r

A What would be the meaning of this part?

Those are all the switches in 7-Zip command line to do the incremental
backup. See the help file subjects of u (Update) command and -u
(Update options) switch. Works great. To test I've completely wiped my
system and completely restored TB in minutes.

-- 
Best Regards,
Greg Strong   

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

Quoting Abe Lincoln: You can please all the people some of the time,
some of the people all of the time, but not all the people all of the
time.



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


Re: Automating backup?

2004-05-16 Thread Greg Strong
Hello Greg,

Sunday, May 16, 2004, 2:36:55 PM, Greg Strong wrote:

A This can't be from a working batch file. Since many of your pathnames
A are not quoted. So the later ones should fail.

GS You are correct on the copy X:\TBArchives\tbreg.reg everything else
GS seems to be working fine.

Well I just wiped my system clean using Eraser on the files and deleted
RIT key in registry and completely restored all 890 MB mail base plus
program directory in about 5 minutes. I would say that is a working
batch file.

So revised incremental backup file

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
TB.bat===

-- 
Best Regards,
Greg Strong   

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

(1) Grab a calculator (you won't be able to do this one in your head).
(2) Key in the first three digits of your phone number (NOT the area
code).  (3) Multiply by 80.  (4) Add 1  (5) Multiply by 250.  (6) Add
the last 4 digits of your phone number.  (7) Add the last 4 digits of
your phone number again.  (8) Subtract 250  (9)  Divide number by 2.  Do
you recognize the answer?



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


Re: Automating backup?

2004-05-16 Thread Greg Strong
Hello Greg,

Sunday, May 16, 2004, 3:43:23 PM, Greg Strong wrote:

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

A No problem. TB is just one program in your batch file. Put it at the
A top, and the rest of the commands will run along after.

GS I did try this but the command box window closed before exiting the TB.
GS Any other ideals.

Probably a good way to corrupt your mail base because compression
continues to run while program is open and running.  :-) I don't think
this is a good ideal!

-- 
Best Regards,
Greg Strong   

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

Without Time, everything would happen at once



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


Re: Automating backup?

2004-05-16 Thread Adam
Hello Greg,

Sunday, May 16, 2004, 6:13:23 PM, you wrote:

GS Hello Adam,

GS Sunday, May 16, 2004, 1:51:21 PM, Adam wrote:

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

A No problem. TB is just one program in your batch file. Put it at the
A top, and the rest of the commands will run along after.

GS I did try this but the command box window closed before exiting the TB.
GS Any other ideals.

Huh? I'd have to, shrug here.

Take a batch file like this. File batch-tb.bat:

 C:\Program Files\The Bat!\thebat.exe
 C:\WINNT\system32\notepad.exe

It will not launch Notepad, until I quit The Bat! myself.

If batch files were going to go on to the next command, before they
finished the last one, then you'd get a notice about Copying Files
Completed, when it only just started.  And you could be deleting all
your files, before they get copied. It'd be chaos.

-- 
Best regards,
 Adam 



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


Re: Automating backup?

2004-05-16 Thread Greg Strong
Hello Adam,

Sunday, May 16, 2004, 6:00:39 PM, Adam wrote:

A It'd be chaos.

I tried it twice. The batch file continued to run after TB started. What
can I say?  If you don't believe me and have WinXP Pro, then take my
batch file and place in c:\program files\the bat!, download 7-Zip, and
run it yourself.

-- 
Best Regards,
Greg Strong   

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

There are no guarantees in life.



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


Re: Automating backup?

2004-05-16 Thread Adam
Hello Greg,

Sunday, May 16, 2004, 9:09:41 PM, you wrote:

GS I tried it twice. The batch file continued to run after TB started.

Yeah, that is what should happen. So it can run more commands later.

GS  What
GS can I say?  If you don't believe me and have WinXP Pro, then take my

I wouldn't be so bold as to say I don't believe you :-)

GS batch file and place in c:\program files\the bat!, download 7-Zip, and
GS run it yourself.

I didn't see a reference about running The Bat! in your batch file. So
I am not sure if I follow so well now. Maybe you can explain.

I did note you set the path in your batch file. So in that case, if
you ran it. And you were at the command line, adding only this in a batch
file:
  thebat.exe
  notepad.exe

And running it at the command line, should leave The Bat! application
running, the Command Prompt window still running, and it will await
you until The Bat! closes.

Maybe the intention was a bit different as you were interpreting in
running the 100 line program you posted.

-- 
Best regards,
 Adam 



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


Re: Automating backup?

2004-05-16 Thread Greg Strong
Hello Adam,

Sunday, May 16, 2004, 7:20:02 PM, Adam wrote:

A I didn't see a reference about running The Bat! in your batch file. So
A I am not sure if I follow so well now. Maybe you can explain.

I added it after you mentioned it to try your suggestion.

A I did note you set the path in your batch file. So in that case, if
A you ran it. And you were at the command line, adding only this in a batch
A file:
A   thebat.exe
A   notepad.exe

I am not running notepad. I'm running 7-Zip command line interface.

A And running it at the command line, should leave The Bat! application
A running, the Command Prompt window still running, and it will await
A you until The Bat! closes.

My tests were in sharp contrast to this last statement. 7-Zip continued
to run the backup from the command line WHILE TB was open, and did NOT
wait until TB closed.

A Maybe the intention was a bit different as you were interpreting in
A running the 100 line program you posted.

My intention was to run 7-Zip command line (i.e. backup TB) after TB
exit. It simply didn't work like you suggested because 7-Zip ran while
TB was still open.

-- 
Best Regards,
Greg Strong   

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

The only sure things in life are death and taxes.



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