=head1 NAME

nbackup - Physical backup manager for Firebird

=head1 SYNOPSIS

=over

=item B<nbackup> [I<option>...] -l|-u|-f I<database>

=item B<nbackup> [I<option>...] -b I<level> I<database> I<file>

=item B<nbackup> [I<option>...] -r I<database> I<file0> [I<file1>...]

=back

=head1 DESCRIPTION

B<nbackup> allows making incremental backups of firebird databases. It also
allows database files to be locked for copying with OS tools like
L<cp(1)>.

=head1 COMMANDS

=over

=item B<-l> I<database>

=item B<-lock> I<database>

Locks I<database> for filesystem copy.

Options of the B<-lock> command:

=over

=item B<-s>

=item B<-size>

Print database size (in database pages) after locking.

=back

=item B<-un> I<database>

=item B<-unlock> I<database>

Unlocks previously locked database.

=item B<-f> I<database>

=item B<-fixup> I<database>

Fixup I<database> after filesystem copy. This needs to be done on the target
database before usage.

=item B<-b> I<level> I<database> I<file>

=item B<-backup> I<level> I<database> I<file>

Create incremental backup of level I<level>. Level 0 means full backup. Level
I<N> includes all the changes since the last backup of level I<N>. I<file> may
be C<stdout> meaning to write the backup data to the standard output.

Additional options to the B<-backup> command:

=over

=item B<-d> I<on|off>

=item B<-direct> I<on|off>

Turns on or off direct I/O during database backup.

Direct I/O may be useful when database is much larger that RAM, because in that
case using buffered I/O may cause replacing useful cache contents with database
file contents, which are generally read only once.

=back

=item B<-r> I<database> I<file0> [I<file1>...]

=item B<-restore> I<database> I<file0> [I<file1>...]

Restore incremental backup. I<file0> is the level 0 backup, I<file1> is the
level 1 backup and so on.

Additional B<-restore> options:

=over

=item B<-de> I<command>

=item B<-decompress> I<command>

Decompress backup file contents using the given I<command>.

=back

B<Note:> B<-restore> should be the last argument to B<nbackup> followed only by
database and file names. All other options must precede B<-restore> or will be
interpreted as backup file names.

=back

=head1 COMMON OPTIONS

=over

=item B<-u> I<user>

=item B<-user> I<user>

User name for connecting to the firebird server.

=item B<-p> I<password>

=item B<-password> I<password>

Password for connecting to the firebird server.

=item B<-fetch_password> I<file>

Read password from specified I<file>.

=item B<-nod>

=item B<-nodbtriggers>

Do not run database-level triggers.

=back

=head1 SEE ALSO

L<gbak(1)>


Additional documentation about B<nbackup> and other Firebird utilities can be
found on the Firebird Project website, L<http://www.firebirdsql.org>.

=head1 AUTHOR

Original idea is of Sean Leyne L<sean@broadviewsoftware.com>.  Designed and
implemented by Nickolay Samofatov L<skidder@bssys.com>.  This work was funded
through a grant from BroadView Software, Inc.

This manual page was written by Damyan Ivanov L<dmn@debian.org> for the Debian
project. Permission is granted to use this document, with or without
modifications, provided that this notice is retained. If we meet some day, and
you think this stuff is worth it, you can buy me a beer in return.
