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

nbackup should allow the use of a custom TCP Port [CORE6284] #6526

Closed
firebird-automations opened this issue Apr 17, 2020 · 6 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Nils Achterholt (gloegg)

nbackup always uses the default port 3050 to lock / unlock databases.
In an environment with multiple instances of firebird on the same server, it is only possible to use nbackup for the instance with the default port.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

nbackup localhost/3051:yourdb should work.

@firebird-automations
Copy link
Collaborator Author

Commented by: Nils Achterholt (gloegg)

Thanks, that does work. Issue can be closed.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

I suppose that actual problem is another. When accessing as database (i.e. localhost/3051:yourdb) nbackup is using config files from instance on port 3051 to expand database name, but for internal conversion from database to file name current instance config of current instance is used. This may cause different results and in the worst case broken backup of wrong database.

We may use getInfo() call to get correct database name after attaching database but at least in 2 cases this also does not work:
- DatabaseAccess=None in firebird.conf (alias will be returned),
- restore is requested - we have absolutely no way to decide where to restore database in non-default instance.

IMHO addition of special service info call to expand database name can do the trick.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

nbackup access database in two ways:
- using Firebird engine via Firebird client - to lock\unlock
- directly to make backup or restore database

When nbackup needs to lock\unlock database is uses fbclient which uses firebird.conf to know TCP port for inet connection string.

So this statement is not fully correct :
> In an environment with multiple instances of firebird on the same server, it is only possible to use nbackup for the instance with the default port.
it is depends on how do you run multiple instances of firebird.

BTW, If you need just "lock\unlock" you may run any query tool (isql, your app, etc) and issue ALTER DATABASE BEGIN | END BACKUP
statement (which actually issed by nbackup too). In this case you may use any connection string\access method you like.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

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

resolution: Won't Fix [ 2 ]

@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

1 participant