Subject Re: [firebird-support] Running gbak from CreateProcess or ShellExecute
Author Robert martin
If you are using Delphi, why not just use the IBBackup / Restore components included as standard. These are simple shells for GBak any way.

Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
Wild Software Ltd
----- Original Message -----
From: Tom Munro Glass
Sent: Tuesday, October 26, 2004 10:05 AM
Subject: [firebird-support] Running gbak from CreateProcess or ShellExecute

I need to run gbak on a remote Firebird server from a Delphi application. I
have tried using CreateProcess and ShellExecute but both of these methods are
giving a really strange problem. The backup works except that the backup
filename ends up with a spurious character on the end of it, e.g.

Below is the command I am trying to execute (note this is normally all one

"C:\Program Files\Firebird\bin\gbak.exe" -backup -verbose -service
kingfisher:service_mgr -user SYSDBA -password masterkey

If I execute this with CreateProcess or ShellExecute, I get the same problem.
If I type this into a Win2K command prompt, it works correctly. I have also
put this exact text into a batch file, testgbak.bat. If I execute
testgbak.bat from a command prompt, it works, but if I execute testgbak.bat
from CreateProcess or ShellExecute the extra character is appended.

I have tried with and without double-quotes around the filenames, and it makes
no difference. I have also tried this with two different Firebird servers,
one running on Win2K and the other running on FreeBSD 4.10, with exactly the
same results on both.

The first two lines of output from gbak are:

gbak: readied database D:\SiteData\007222\007222_SiteData4.fdb for backup
gbak: creating file D:\SiteData\007222\Backup\007222_SiteData4_DL1.fbkº

I'm using Firebird 1.5.1 on both the client and servers.

Can anyone please explain this?

Tom Munro Glass

Yahoo! Groups Sponsor

Yahoo! Groups Links

a.. To visit your group on the web, go to:

b.. To unsubscribe from this group, send an email to:

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

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