Subject Re: [firebird-support] Common file structure in Linux/Windows/32/64?
Author Ann Harrison
On Wed, Jun 15, 2011 at 9:29 AM, Poul Dige <pd@...> wrote:
> Could anybody tell wheter or not it is legal to move a .FDB file between 32 and 64 bit server versions, and different Linux and Windows distributions? I.e. can I move a .FDB file from a win32 server to a Ubuntu 64 bit server with 64 bit Firebird server running on it? (Tests indicate that it is possible...).
>

Fortunately, very little in database management has the power of law,
except natural laws that some things work and some things don't, and
some things appear to work in limited testing and blow up all over
when you release them to customers.

Firebird uses native "endian" and alignment characteristics both in
memory and on disk. That used to be a big deal when there were dozens
of processor families and operating systems that did things
differently. (I once worked on a COBOL compiler that had two
different integer types, one big-endian, one little endian because the
developers guessed wrong about the native behavior of a PDP_11.)

The Firebird developers when to some trouble to insure that 64 and 32
bit servers stored bits on disk exactly the same way, starting with
the first official 64 bit releases. So your problem is not with Linux
or Windows or 32 or 64 bit architectures, but with endianness and
alignment. A 32-bit SPARC running Linux or a 64 bit CRAY running
anything is going to require a backup/restore. An Intel almost
anything is safe.

But Helen will tell you, and she's right, that back/restore is a
better way to move databases than copying them.

Cheers,

Ann