Subject Re: [firebird-support] Re: gbak to a non existing directory - Email found in subject
Author jen_ming77@yahoo.com
U
Powered by Telkomsel BlackBerry�

-----Original Message-----
From: Milan Babuskov <milanb@...>
Sender: firebird-support@yahoogroups.com
Date: Thu, 07 Jun 2012 14:22:26
To: <firebird-support@yahoogroups.com>
Reply-To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: gbak to a non existing directory - Email
found in subject

ma_golyo wrote:
> To stat a new customer we have to
> #1 : copy the app to new folder (win)
> #2 : copy the initial DB to new folder (linux)
> #3 : update inital DB metadata to current app version
>
> I'm writing (Delphi) app which does the steps above. App runs on the terminal (win) server.
> #1 : OK
> #2 : not OK. I cannot create new DB with FB, and I cannot restore a DB with GBAK to a non existing directory.

I'm not sure about Delphi's capabilities here, but I see two possible
solutions:

a) log into Linux using SSH protocol and create directory using the
system mkdir command with --parents switch. Then set up privileges with
chown and chmod.

b) write small Linux UDF that creates directories, register it in some
database (employee.fdb for example) and call it from code:

db.Query("select createDir("/path/on/linux") from rdb$database");

HTH

--
Milan Babuskov

==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================




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