Subject | Re: running firebird without installing it |
---|---|
Author | Adam |
Post date | 2006-08-06T23:29:12Z |
> > In short, it simply is a bad idea to copy a fdb file. Firebird canlocks.
> > generate a safe hot backup. This means that you can get a backup
> > without shutting down the database engine and without causing any
>My objection is not with distributing the fdb file per se. My
> While in general I'd concur with that Adam, a quick copy of a 'blank'
> database which is only to be used on the same OS is not a total no-no.
> Add the embedded server and it's a crude but fast install.
objection is that taking a copy of a file that is in use by the dbms
will lead to corruption, and the nature of some types of this
corruption means that you don't notice it until one of your backups
fails to restore - which if you do not have the right backup processes
in place normally occurs when you really need the backup to work.
Let me give a brief example. Firebird stores the index that polices
the primary key constraint in a different page on disk to the record
itself. If you take a file copy of a database, then the database file
is read sequentially. It may be possible to end up copying the index
page before it contains the record and the data page after it contains
the record, and the TIP after it has been committed. You will then be
in the situation where you can violate the unique constraint on the
primary key without Firebird noticing.
Sometimes it makes sense to distribute the complete fdb file rather
than a backup. For example, you may be sending out a CD/DVD so space
is not an issue, or you may have a high speed internet connection and
so the overhead of the additional time and cost to transmit the fdb
file over the fbk file is not worth the time overhead of restoring a
backup.
If you decide that copying is the best way to go, then still use gbak
to copy the database, then restore that fbk file to a new fdb file.
That way you know no-one is using the database, and a nice benefit is
that the indices are rebuilt nicely, and any garbage is removed.
If all of that seems like too much hard work, then at the very minimum
shutdown the Firebird Service and rename the fdb file to make sure
nothing is changing the file before taking a file system copy. You
will not get the benefit of a restore, but at least that will prevent
the database being corrupted by that copy process.
>machines.
> Having said that jesus - I only run FAT32 on the W98SE and NT4
> If I may be going to an NT machine running NTFS then I WOULD always useI don't have to worry about supporting anything prior to win2K, we use
> the backup ;)
remote desktop from such clients.
What is so special about NT/NTFS combo that makes a backup more necessary?
Adam