Subject | Re: [firebird-support] gbak appears to be frozen |
---|---|
Author | Helen Borrie |
Post date | 2010-08-04T04:29:38Z |
At 02:48 PM 4/08/2010, you wrote:
./heLen
>Dear Helen,"Garbage control" - well, yes, if you have to. But "transaction control", no. You effect transaction control from your application code by writing it in such a way that it permits Firebird's built-in garbage control to work effectively. In other words, if the "whole purpose" of backups is to clean up garbage then it is a band-aid solution.
>
>Thank you for your response.
>
>The whole purpose of my sweep/backup/restore on a 3-4 week basis is for garbage (transaction) control.
>These are the exact command I do on a routine basisIt is not required to quote the password. In conditions where the password requires quoting (i.e., in SQL), double quotes are not valid.
>
>gfix -user SYSDBA -password "masterkey" DBNAME.FDB -sweep
>
>gbak -v -t -user SYSDBA -password "masterkey" DBNAME.FDB DBNAME.FBK
>
>gbak -c -v -p 8192 -user SYSDBA -password "masterkey" DBNAME.FBK DBNAME2.FDB
>
>yes, I do put the double quotes around the password
>and there is no -b switch in the backup command.Errrm, *yes there is*. The command to back up is gbak -b[ackup]. Check it again.
>Could you advise if the above commands are the proper commands I should be executing? In some other threads I do recall reading that a sweep is not necessary if a backup/restore is performed, but I do it anyway.Sweep and gbak both clean up garbage, i.e., old record versions and delete stubs. If you need to run gbak -b to clean up garbage then you don't need to run sweep as well. OTOH, if you sweep first then gbak -b without the -g switch will be faster because gbak -b will have little or no garbage to clean up. And if you run gbak -b with the -g switch then you will still have the garbage in the original database...in which case, restoring the database using gbak -c will be faster altogether because you won't be keeping the old garbage-ridden database.
>Very often there is discussion in this forum regarding the proper commands to use,but I use the above and they seem to solve my problems.Well, I'm certainly still curious to know whether you are getting restorable backups while omitting the -backup switch...if you do, then apparently (unbeknown to me) gbak will default to -backup if there is no mode switch.
./heLen