Subject Re: Truncating transaction logs in Firebird in v2.01 - v2.03
Author Adam
--- In, Niben M Singh <niben_s@...>
> Thanks for the responses!
> I guess in Firebird term it is called SWEEP or GARBAGE COLLECTION.
> GBAK does garbage collection by default, unless you specify "-g" option.

Correct. Although no matter what you select, the garbage is *never*
stored in the backup file. That switch is about whether you wish to
take the opportunity to clean up the database you are currently
backing up. So if you are running a nightly backup, then use gbak
without that switch. If you are just making a backup, and have no
intention to keep the original database, you can use -g to let it
backup faster.

> So it is confusing to me when I backed up the database after manual
SWEEPING and with Garbage Collection -- Restored the database from
backup into new file -- SWEEPED new database again -- again backed it
up with garbage collection -- and eventually re-restored again into
new database file.
> After doing that the final size of the new file is dramatically
reduced. The data and schema has not changed, however....

That does not make sense. A backup/restore cycle *is* likely to result
in a smaller file (as the garbage is no longer there after the
restore). But immediately performing a second backup-restore cycle on
a database that has just been through one should make absolutely no

Perhaps someone connected during the restore operation causing it to
not restore properly?