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

Space in database path prevent working gbak -se ... -b "pat to/database" backup [CORE6392] #6630

Closed
firebird-issue-importer opened this issue Aug 19, 2020 · 6 comments

Comments

@firebird-issue-importer

Submitted by: Basil A. Sidorov (basid)

databases.conf:
test = c:/program files/test/test.fdb

and:
> gbak -z -se localhost/13050:service_mgr
-st dtrw -verbi 2147483647 -b -g
"test"
nul
|findstr "byte time total version"
gbak:gbak version WI-V3.0.5.33220 Firebird 3.0
Firebird/Windows/AMD/Intel/x64 (access method), version "WI-V3.0.5.33220 Firebird 3.0"
on disk structure version 12.0
gbak: time delta reads writes
gbak: 0.012 0.000 15 1 database test has a page size of 16384 bytes.
gbak: 0.016 0.000 2 0 closing file, committing, and finishing. 512 bytes written
gbak: 0.016 0.000 88 1 total statistics

vs:
> gbak -z -se localhost/13050:service_mgr
-st dtrw -verbi 2147483647 -b -g
"%ProgramFiles%\test\test.fdb"
nu
l|findstr "byte time
total version"
gbak: ERROR:I/O error during "CreateFile (open)" operation for file "C:\PROGRAM"
gbak: ERROR: Error while trying to open file
gbak: ERROR: Нgbak:Exiting before completion due to errors
gbak:gbak version WI-V3.0.5.33220 Firebird 3.0

Commits: cb2a6cf 64ec331

====== Test Details ======

Implemented only for Windows.
NOTE.
Some problem still exists when DB file or folder has name which last character is '.' or ' ' (dot or space).
Database will be created but attempt to backup raises: "gbak: ERROR:cannot open backup file ..."

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 19, 2020

Commented by: Lester Caine (lsces)

There are still many places where the crass way Microsoft decided that space was a valid character in a file name still causes problems and it is normal for safety to always wrap them in double quotes
test = "c:/program files/test/test.fdb"
It is the only way to distinguish white space IN the file name from white space between elements of the data

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 19, 2020

Commented by: Basil A. Sidorov (basid)

Quotes not need into firebird.conf:
> fbsvcmgr localhost:service_mgr
action_backup
dbname "%ProgramFiles%\test\test.fdb"
bkp_file nul
...
gbak:readied database C:\Program Files\test\test.fdb for backup
...
gbak:database C:\Program Files\test\test.fdb has a page size of 16384 bytes.
...
gbak:closing file, committing, and finishing. 512 bytes written

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 21, 2020

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 24, 2020

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 RC 1 [ 10930 ]

Fix Version: 3.0.7 [ 10940 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 27, 2020

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

Test Details: Implemented only for Windows.
NOTE.
Some problem still exists when DB file or folder has name which last character is '.' or ' ' (dot or space).
Database will be created but attempt to backup raises: "gbak: ERROR:cannot open backup file ..."

Test Specifics: [Platform (Windows/Linux) specific]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 27, 2020

Modified by: @pavel-zotov

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants