Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow remote nbackup like gbak [CORE6263] #6505

Closed
firebird-automations opened this issue Mar 14, 2020 · 8 comments
Closed

Allow remote nbackup like gbak [CORE6263] #6505

firebird-automations opened this issue Mar 14, 2020 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Chau Chee Yang (cheeyang)

Duplicates CORE4442

I have a Firebird Server install on Linux machine at service endpoint: 192.168.0.198/3050.

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 192.168.0.198:employee stdout > c:\employee.fbk

or fbsvcmgr works:

c:\> fbsvcmgr 192.168.0.198:service_mgr 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 192.168.0.198:service_mgr 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 192.168.0.198:service_mgr user sysdba password masterkey action_nbak dbname employee.fdb nbk_level 0 nbk_file stdout > c:\employee.nbk

@firebird-automations
Copy link
Collaborator Author

Modified by: Chau Chee Yang (cheeyang)

description: I have a Firebird Server install on Linux machine at service endpoint: 192.168.0.198/3050.

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

Both *gbak* command:

{code:dos}
c:\> gbak -b -user sysdba -password masterkey 192.168.0.198:employee stdout > c:\employee.fbk
{code}

or *fbsvcmgr* works:

{code:dos}
c:\> fbsvcmgr 192.168.0.198:service_mgr user sysdba password masterkey action_backup dbname employee bkp_file stdout > "c:\employee.fbk"
{code}

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

{code:dos}
c:\> fbsvcmgr 192.168.0.198:service_mgr 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
{code}

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

{code:dos}
c:\> fbsvcmgr 192.168.0.198:service_mgr user sysdba password masterkey action_nbak dbname employee.fdb nbk_level 0 nbk_file stdout > c:\employee.nbk
{code}

=>

I have a Firebird Server install on Linux machine at service endpoint: 192.168.0.198/3050.

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 192.168.0.198:employee stdout > c:\employee.fbk

or fbsvcmgr works:

c:\> fbsvcmgr 192.168.0.198:service_mgr 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 192.168.0.198:service_mgr 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 192.168.0.198:service_mgr user sysdba password masterkey action_nbak dbname employee.fdb nbk_level 0 nbk_file stdout > c:\employee.nbk

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

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.

@firebird-automations
Copy link
Collaborator Author

Commented by: Chau Chee Yang (cheeyang)

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.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

Link: This issue duplicates CORE4442 [ CORE4442 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Complete duplicate of CORE4442

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants