Subject Re: [firebird-support] Live backup firebird database using LVM
Author Ann W. Harrison
Hannes Streicher wrote:
>
>> I need to hot backup large Firebird databases to other physical locations.
>> This databases are in LVM partitions.
>> It's safe to snapshot the filesystem and copy the file database
>> (from the snapshot of course) to the other location using rsync?
>
> NO , data keep in Memory may not be flushed out to disk yet ,
> or still halfway thru

Err, in order for the database to survive system crashes, Firebird
continuously maintains the on-disk copy of the database in a consistent
state. Before a transaction is committed, all of its changes are on
disk, including changes to generators and internal structures. It
uses a technique called "careful write" to maintain consistency.
Careful write is a simple concept - before you write a pointer, you
must have written the thing being pointed to - and since it avoids
the need to maintain a separate log file and write every change twice,
the fact that it causes a few extra writes is not all that important.

So data kept in memory will be flushed out if it is committed and
the database is continuously valid during the write.


Best regards,

Ann