Issue Details (XML | Word | Printable)

Key: CORE-6263
Type: Improvement Improvement
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Chau Chee Yang
Votes: 0
Watchers: 4

If you were logged in you would be able to see more operations.
Firebird Core

Allow remote nbackup like gbak

Created: 14/Mar/20 05:31 AM   Updated: 22/Jul/20 10:43 AM
Component/s: NBACKUP
Affects Version/s: None
Fix Version/s: None

Client: Windows
Firebird server: Linux host at
Issue Links:

QA Status: No test

 Description  « Hide
I have a Firebird Server install on Linux machine at service endpoint:

I can use gbak or service manager to remote backup database hosted on the Linux machine in Windows client.

Both gbak command:

c:\> gbak -b -user sysdba -password masterkey stdout > c:\employee.fbk

or fbsvcmgr works:

c:\> fbsvcmgr user sysdba password masterkey action_backup dbname employee bkp_file stdout > "c:\employee.fbk"

It is also possible to use nbackup action in fbsvcmgr but backup to local file system only:

c:\> fbsvcmgr user sysdba password masterkey action_nbak dbname employee nbk_level 0 nbk_file /tmp/employee.nbk
time elapsed 0 sec
page reads 307
page writes 307

Unfortunately, send the backup to stdout doesn't work:

c:\> fbsvcmgr user sysdba password masterkey action_nbak dbname employee.fdb nbk_level 0 nbk_file stdout > c:\employee.nbk

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 17/Mar/20 11:31 AM
I'm far unsure that feature is worth using (and implementing). Yep, it appears fine at first look but it has a number of serious disadvantages:
- Everything related with backup/restore should better be symmetric (i.e. if we have some way of backup same way of restore should be present). But we pure logically can't use stdin when restoring nbackup of level ,ore than zero cause we need to restore from multiple files (0, 1, 2, etc. levels). But we have only one stdin.
- When doing nbackup database is locked i.e. all modified pages are written to delta file which should be merged back to database after backup completion. The larger that delta the bigger performance penalty one gets when merging it, therefore obvious requirement is to perform backup as fast as possible. And sending copy of a database over the wire hardly makes it faster.

Chau Chee Yang added a comment - 17/Mar/20 12:13 PM
Sending nbackup copy via service manager or network won't suite all use cases. But it do a number of needed cases:

1. Usually backup are perform in a high speed LAN environment, sending large database over LAN isn't an issue at all. Moreover, backup are usually perform during non peak hour. It won't bring much impact on delta files.

2. Backup is more important than restore in database management. A database administrator usually perform backup in timely fashion but restoring only perform when disaster happen.

3. If multi level backup is an issue, may be we can perform level 0 nbackup over stdout first.

Alexander Peshkov added a comment - 22/Jul/20 10:04 AM