Subject | Re: [firebird-support] gbak with servicemanager and filenames with spaces |
---|---|
Author | Ivan Prenosil |
Post date | 2006-01-12T08:34:36Z |
> i have two problems using gbak with service manager:It is bug in GBAK, if you call ServiceAPI directly it will work correctly.
> I want to run gbak from a client application to backup a database.
> When the filename (or path) of the database or the backup file contains one or more spaces, it doesn't work.
> When i put the filename into quotes, the parameters are send via TCP/IP without quotes, and the servicemanager stops
> interpreting the filename at the space.
> When i escape the Space with a backslash (i.e. "/public/Treesoft\ Office/Data1.fdb"), the firebird server aborts and
> restarts. The log says: fbserver: terminated abnormally (3221225477). In Linux the entry is: terminated abnormally
> (-1).
You can test it e.g. using FSQL command line tool from here
http://www.volny.cz/iprenosil/interbase/
this should work
CONNECT SERVICE 'service_mgr' USER 'sysdba' PASSWORD 'masterkey';
BACKUP 'C:\Program Files\TESTDB.FDB' 'C:\Program Files\TESTDB.GBK';
RESTORE 'C:\Program Files\TESTDB.GBK' 'C:\Program Files\TESTDB2.FDB';
>It is also bug in GBAK. Currently I have installed FB2 and I did not manage to reproduce it,
> Second problem occurs when i run gbak from Windows API CreateProcess. There is a obviously uninitialized memory, which
> is used to pass the parameters to the service manager. Thus gbak adds a special character (ASCII-Hex E0 or D0) to the
> last filename.
so it seems to be fixed (but I can't say for sure, since the bug happened just sometimes).
Ivan