Direct I/O (Firebird 2.1.4+)
Originally, nbackup used direct I/O only when making a backup under Windows NT (and successors like 2000, 2003 etc).On all other OS’es, direct I/O was off.This caused problems on some Linux systems, so in versions 2.0.6 and 2.1.3 direct I/O was switched on under Linux as well.However, this turned out to be problematic for certain other Linux configurations.In 2.1.4 and 2.5 the original behaviour was restored, but this time as a default that was overridable by a newly added parameter: -D
.Its use is as follows:
nbackup -B 0 cups.fdb cups.nbk -D on -- direct I/O on
nbackup -B 0 mugs.fdb mugs.nbk -D off -- direct I/O off
Just like the option letters themselves, the arguments ON
and OFF
are case-insensitive.
Direct I/O is only applied when making a backup, not during a restore.Under Windows it is realized by setting FILE_FLAG_NO_BUFFERING
.On other systems, O_DIRECT
and POSIX_FADV_NOREUSE
are used.The latter two are sometimes unavailable;in such cases, they are (or one of them is) silently left out.Even if the user specified -D on
explicitly, this doesn’t lead to a warning or error message.