Alter.Org.UA  
 << Back Home RU ru   Donate Donate www/www1/www2

The Bat TBB recovery tool for Windows

Extracts e-mails from damaged TBB-file using signature lookup. You get correct TBB file on output. This utility can either skip or undelete deleted messages. Also, you can specify range for extraction (by message number or by offset in source file). Tested on The Bat ver. 2.02.3 and 4.1.11.

Works under all Windows versions - Windows (95/98/Me/NT/2000/XP/etc.).

Recovery steps:

  • disable automatic connection to the server and exit The Bat.
  • make copy of orignal (damaged) messages.tbb and messages.tbi
  • process messages.tbb with tbbcopy
  • place obtained .TBB file back to corresponding mail folder of The Bat and rename it to messages.tbb, then remove messages.tbi from the same folder.
  • run The Bat and perform integrity check of newly recovered folder.
Usage:
  tbbcopy.exe [-<switches>] <source file> <target file>
      or
  tbbcopy.exe [-<dd-style options>]
      or
  tbbcopy.exe -a [-d+] <source file>
Switches:
  -a                  automated repair. Make backup of .TDB and .TDI and
                      perform restore to original filename.
  -o[b|k|m|g] <offset>  offset in bytes (or optionally in blocks, KBytes, MBytes or GBytes)
                      to start recovery from (since v1.2)
  -l                  just dump e-mail list
  -f                  dump e-mail From: header
  -L <logfile>        log unreliable and bad blocks to <logfile>
  -d[+|-]             include (+) or exclude(-) deleted messages
  -k                  keep message size, don't repair when extracting (since v1.2)
  -m <num>            start from message <num> (since v1.2)
  -M <num>            process not more than <num>
  -?                  display this help
DD-style options:
  if=<source file>
  of=<target file>
  seek=<blocks>
Note:
  1 KByte = 1024 bytes
  1 MByte = 1024 KBytes = 1024*1024 bytes
  if byte offset or byte count is specified, it will be rounded to blocksize
Examples:
  tbbcopy.exe X:\mail\messages.tbb E:\Temp\Restored.tbb
    will extract all not deleted messages
  tbbcopy.exe -o 10M X:\mail\messages.tbb E:\Temp\Restored.tbb
    will extract messages starting from byte offset 10Mb to end of file
  tbbcopy.exe -a X:\mail\messages.tbb
    will make backup to X:\mail\messages.bkp.tbb and X:\mail\messages.bkp.tbi 
    and store extracted messages in X:\mail\messages.tbb

Download

The latest version with sources - tbb_recovery_v1e.rar/tgz (42 Kb/45.4 Kb)

History

  • Internal buffer is allowed to groq up to maximum message size. It is necessary for header length fixup. When -k is used, buffer has fixed size since no correction is performed.
  • Added warnings when mutually exclusive options are used.
    tbb_recovery_v1e.rar/tgz (42 Kb/45.4 Kb)
    2017.07.04

  • Fixed bug with -d and -a support, now -a doesn't ignore -d+
  • Fixed bugs in I/O buffering. Now long messages doesn't get damaged. Also fixed bug with broken last 64k of the file.
  • Added -f option for displaying From: header in log.
    tbb_recovery_v1d.rar/tgz (41.8 Kb/45 Kb)
    2017.06.30

    There was an attempt to recover 25Gb file. Appeared, that options -o (initial scan seek) and -m (skip first messages) do not work. Fixed, thanks to Vladimir Gluschenko for bug report.
    Added new option -k which prevents message size "recovery" during extaction. Sometimes we want to keep original size in message header.
    tbb_recovery_v1b.rar/tgz (38.7 Kb/41.9 Kb)
    2013.09.08

    I've met the problem again. Appeared, that actually problem starts when .tbb file reaches 1Gb. TheBat can't compress it any more, but still can successfully import new messages. No warnings appear. File grows up quickly and after 2Gb TheBat stops receiving new messages without any comments.
    For convenience I've added -a option (automated). It requires the only parameter - .tbb file name. Then original .tbb and .tbi files are backed up and recevered .tbb is placed to original location. When all done, you should only remove unnecessary backup files.
    tbb_recovery_v1a.rar/tgz (38.4 Kb/41.6 Kb)
    2013.08.26

    The 1st version. Appeared due to my need to repair 2Gb .tbb file. None of available tools could help. All them tried to map or load entire file to memory and failed.
    tbb_recovery_v1.rar/tgz (36.9 Kb/39.2 Kb)
    2012.09.20

    Please, send your comments and propositions here: Mail to alterX@alter.org.ua (remove X)  

  • designed by Alter aka Alexander A. Telyatnikov powered by Apache+PHP under FBSD © 2002-2017