Issue Details (XML | Word | Printable)

Key: CORE-6284
Type: New Feature New Feature
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Nils Achterholt
Votes: 0
Watchers: 4
Operations

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

nbackup should allow the use of a custom TCP Port

Created: 17/Apr/20 07:34 AM   Updated: 18/Apr/20 06:31 AM
Component/s: NBACKUP
Affects Version/s: None
Fix Version/s: None

QA Status: No test


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 17/Apr/20 07:39 AM
nbackup localhost/3051:yourdb should work.

Nils Achterholt added a comment - 17/Apr/20 08:49 AM
Thanks, that does work. Issue can be closed.

Alexander Peshkov added a comment - 17/Apr/20 08:50 AM
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.

Vlad Khorsun added a comment - 17/Apr/20 09:15 AM
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.