Subject Re: Shred records
Author hugo.larson
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 07:19 AM 28/04/2007, you wrote:
> >Hello,
> >
> >My question is if its possible to somehow shred deleted records making
> >them impossible to recover.
>
> My question is what evidence do you have that it is possible to
> recover deleted records from a Firebird database. :-)
>
> I'm not really trying to be a smartass...but usually we get the
> opposite question: is it really impossible to retrieve records that
> were deleted by mistake? (It is! well, nearly....There are complex
> tools and procedures in very expert hands that may be able to
> identify and recover *some* recently-deleted data if the database has
> been taken off-line immediately the mistake occurred).
>
> The main thing that makes retrieving deleted records between
> "difficult" and "impossible" is the fact that Firebird doesn't store
> table data in physical tables at all (c.f. Access, MySQL,
> MSSQLServer, DBISAM, etc., which do literally maintain physical files
> within internally controlled directory structures...find the files
> and you've found the tables, indexes, etc. These products often have
> "undelete" tools that can be used by chimpanzees.)
>
> In Firebird and InterBase, once a delete is committed the deleted
> record version is marked for garbage collection. At that point those
> experts with their abstruse tools have a chance of getting inside the
> database file and sifting through the garbage in the hope of finding
> something. The worse the application code, the better the
> chances. If you have nice clean application code that doesn't leave
> obsolete record versions around, the normal course of events for
> deleted records is sudden death by decapitation...that is, they are
> replaced by a stub which will disappear next time you do a sweep.
> After that, the physical space where the record was before is just a
> campsite waiting for new tenants.
>
> Of course, if you do a backup and restore, even the empty space is
> gone. Back versions and stubs are not backed up.
>
> ./heLen
>

Hello Helen,

Thank you for the thorough explanation on the matter.
I was actually trying to find the answer to my question by researching
if it's possible to retrieve deleted records. As you say there are
some ways achieving this with tools such as IBundelete or hexeditors.
Can I conclude that the Nature of Firbird makes it impossible to
recover deleted or updated records once the database performs a SWEEP?
That is if the delete or update is committed properly.

Regards,
Hugo