Subject Re: [firebird-support] gbak is taking a very long time to execute
Author Helen Borrie
At 12:11 PM 28/01/2011, Theodore Zafiropoulos wrote:

>So does that mean that if I omit garbage collection in the backup process by the command,
>
>gbak -v -t -g -user SYSDBA -password "masterkey" DBNAME.FDB DBNAME.FBK
>
>when I create a new database using
>
>gbak -c -v -p 8192 -user SYSDBA -password "masterkey" DBNAME.FBK DBNAME2.FDB
>
>there will be no garbage transactions in the newly created DBNAME2.FDB database?

Restore NEVER restores garbage - because it never backs it up!!

>Would you advise to stop the current running backup and restart using the -g option?

Up to you whether you restart or let it run now...but running a backup with the -g switch creates a backup file *without* attempting to look for garbage to clean up in the database it is attached to. The point Thomas makes is that, if you plan to restore immediately from that backup, it is pointless to perform garbage collection on it!

>> Another thing you could try is to use the service manager way to execute
>> the backup and restore.
>
>>With a sweep interval of 20000, I sweep should have been kicked in and
>>if it has, then it couldn't have done the job properly due to active
>>connections/transactions.
>
>There are no users on the system currently.

What Thomas means is that, if you still have users logged in and having long-running transactions, then sweep will have little or no opportunity to clear garbage. When you are running apps that are tying up more than 22 million transactions over three weeks, it is better to disable auto sweep and deliberately do a manual sweep every day when users are all off-line.

Even better would be to fix the apps!!

./heLen