Subject Re: [firebird-support] gbak is taking a very long time to execute
Author Theodore Zafiropoulos
To all who helped,

Thank you for your input, it turned out that someone deleted around 90 Milliion records and that's what caused the long time in the 'normal' backup/restore process. Last time a large amount of records were deleted, the backup/restore process took around 4 days to complete without the -g option. Since there was more data deleted this time, it would have probably taken longer than 4 days,

By including the -g option in

gbak -v -t -g -user SYSDBA -password "masterkey" DBNAME.FDB DBNAME.FBK

that did not include garbage collection in the backup stage and process was rather quick.

>
> 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?

Correct. The backup process never stores garbage in the backup file.
It's all about doing garbage collection in the source database you are
attached to with the gbak utility during the backup process.

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

Thank you for your help!

Theodore

[Non-text portions of this message have been removed]