Subject | Re: [firebird-support] Live backup firebird database using LVM |
---|---|
Author | Ann W. Harrison |
Post date | 2010-03-19T18:20:34Z |
Christian wrote:
you specify forced write and your hardware supports a real
forced write. Firebird uses careful write to keep the database
consistent between every page write, so as long as pages go
to disk in the order Firebird writes them and you get an
instantaneous snapshot, all should be well. An ordinary
file copy will see a changing state of the database across
the time it takes to make the copy which will not be consistent.
A snapshot of a database that's suffering from caching by the
operating system or disk controller will not be consistent
either.
So the safe alternatives are 1) take the server down and copy
or 2) make a gbak backup and copy that or 3) use nbackup to
quiesce the database and copy it. All of those are immune
to lying disk controllers.
Cheers,
Ann
> I need to hot backup large Firebird databases to other physical locations.A direct copy from an LVM snapshot should be OK, as long as
> 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?
> There are any risk to get a corrupted database?
you specify forced write and your hardware supports a real
forced write. Firebird uses careful write to keep the database
consistent between every page write, so as long as pages go
to disk in the order Firebird writes them and you get an
instantaneous snapshot, all should be well. An ordinary
file copy will see a changing state of the database across
the time it takes to make the copy which will not be consistent.
A snapshot of a database that's suffering from caching by the
operating system or disk controller will not be consistent
either.
So the safe alternatives are 1) take the server down and copy
or 2) make a gbak backup and copy that or 3) use nbackup to
quiesce the database and copy it. All of those are immune
to lying disk controllers.
Cheers,
Ann