Subject Re: [firebird-support] Snapshot back up from VB6
Author Mark Rotteveel
On 5-4-2014 03:56, Andrew Gable wrote:
> Just wondering how or if it is possible to do a snapshot back up of a
> Firebird database from VB6?
>
> I can get the location of the database but whenever I try to copy the
> file to my back up drive with in
> VB6 I get a error 70 Permission denied.
>
> I Do not want to use any external applications to back up the database
>
> Can someone help or point me in the right direction?

Copying the database file when it is in use is not a good idea, you can
get a copy that is in an inconsistent state. The copy mechanism that you
use probably tries to get exclusive access to the file, which doesn't
work as Firebird is also using the file.

I'd suggest you use the service API to create a gbak or nbackup backup
of Firebird; this requires no external applications (except of course
the Firebird server itself).

The other option (if you are using Firebird 2.0 or higher) is to use
ALTER DATABASE BEGIN BACKUP, copy the file (which probably still
requires a copy method that doesn't require exclusive access), and then
when you are done ALTER DATABASE END BACKUP. See
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-ddl-database.html#langrefupd25-alter-db

Mark
--
Mark Rotteveel