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

Add "just make me a copy" mode to NBackup [CORE6229] #6473

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

Add "just make me a copy" mode to NBackup [CORE6229] #6473

firebird-automations opened this issue Jan 14, 2020 · 14 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Arioch (arioch)

To make a fast database copy, when it is in active work, today one has to issue two commands: nbackup -b 0 followed by nbackup -r

This is not very intuitive. Also, this makes database copied twice (UNIX guys would probably think of pipelining here, but it also has some drawbacks).

It seems to be more intuitive AND fast if nbackup just had an option to create the database copy in one pass, using only one command from user.

@firebird-automations
Copy link
Collaborator Author

Modified by: Arioch (arioch)

description: To make fast dataabse copy, when it is in active work, today you have to issue tw ocommands: nbackup -b 0 and then nbackup -r

This is not very intuitive. Also, this makes database copied twice (UNIX guys would probably think of pipelining here, but it also has some drawbacks).

It seems to be more intuitive AND fast if nbackup just had an option to create the database copy in one pass, using only one command from user.

=>

To make a fast database copy, when it is in active work, today one has to issue two commands: nbackup -b 0 followed by nbackup -r

This is not very intuitive. Also, this makes database copied twice (UNIX guys would probably think of pipelining here, but it also has some drawbacks).

It seems to be more intuitive AND fast if nbackup just had an option to create the database copy in one pass, using only one command from user.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

NBackup already has this function, via the lock/unlock option.

See https://firebirdsql.org/manual/nbackup-lock-unlock.html

@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 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Arioch (arioch)

No it does not have "this function"

It is three commands instead of one and it is still less intuitive.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

You don't have to "restore" backup of level 0, if you need a database copy instead of backup.

Just "fix" it: https://firebirdsql.org/manual/nbackup-lock-unlock.html#nbackup-restore-and-fixup

@firebird-automations
Copy link
Collaborator Author

Commented by: Arioch (arioch)

The "fix" is described in both your and Sean's docs as following -L operation not -B 0 one.

And it is still less convinient and less simple

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

> The "fix" is described in both your and Sean's docs as following -L operation not -B 0 one.
If you read the docs you should understand that "backup" of level zero is the copy of locked database.
So, you could just "fix" it instead of "restore".

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Maybe it's worth allowing both -b 0 and -f together? Or some other modifier for -b 0 to fixup the resulting copy automatically.

@firebird-automations
Copy link
Collaborator Author

Commented by: Arioch (arioch)

> If you read the docs you should understand

There are two problems with this claim.

1. Is user really expected to be deducing from implications, rather than reading explicitly and clearly stated things? If so, why need documentation at all? Sources are the ultimate documentations for themselves. User might read sources and should understand, etc.

2. That seems to be "implementation details" as opposed to "code by contract".
Is it clearly and explicitly stated in documentation that "-b 0" is the same as "-l" + copy + "-u", and, importantly, that it WON'T CHANGE in foreseeble future?

If not, then you as developer can use implementation details in production, but users can not.
You would be among first to blame users for any screw up caused by their cutting corners and using historical features that were not explicitly promised in documentation. You would be among first to claim that users' habit of using undocumented things which "always worked so for years" is holding you back and prohibits you from enhancing Firebird, which would require changing habitual side effects of legacy implementation.

Introducign such a switch would serve both makling it intuitive and obvious AND making it the contract users can rely upon and developers knowing not to break without BIG RED WARNING in all the docs around.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Dmitry,

I don't think that adding modifier for -b 0 is good idea. It will not make things simpler. It will not work with -b 1, for example.
We could add special new switch to do {-b 0, -f} at one step but I see no value in it.
It adds nothing, except maybe additional confusion for end user.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Arioch,

you never listen to others arguments. There is only one correct opinion - yours.
I see no sense to continue this useless discussion.

@firebird-automations
Copy link
Collaborator Author

Commented by: Arioch (arioch)

It is half the problem if i can't hear your arguments.
It is much worse when you don't hear your own arguments.

Just today you said : "Ибо не надо закладываться на чужое внутреннее поведение, которое может и будет меняться." - "Because one should never found his actions upon others implementation derails which can and eventually would get changed".
https://www.sql.ru/forum/actualutils.aspx?action=gotomsg&tid=1321312&msg=22061422

That is exactly the case with "-b 0 is the same as -l".
Unless that is explicitly stated in documentation as a contract that Firebird Team pledges not to violate - this can not be relied upon by users because it is exactly implementatio ndetail that must remain volatile and arbitrary..

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

1. The cite you show above is abosilutely different case.
2. Nobody never said that "-b 0" is the same as "-l". Both have some common parts, but thay are not the same. You should be more attentive.
3. Ask to update documentation, if you consider it incomplete.

This ticket is closed, accept it and keep calm.

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