-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Labels
bugThis addresses a bugThis addresses a bug
Description
Bareos component version
- bareos-dir --version: 22.1.2-r2
- bareos-dir --version: 22.1.2-r2
- bareos-sd --version 22.1.2-r2
- bconsole --version 22.1.2-r2
Steps to reproduce
- Run a
create_bareos_databasescript with envdb_namewhich has dots or any other special character.
Expected results
Created DB
Actual results
Info: Creating database 'infra.backup.bareos'
psql:<stdin>:2: ERROR: syntax error at or near "."
LINE 1: CREATE DATABASE infra.backup.bareos ENCODING 'SQL_ASCII' LC_...
^
Warning:
Warning: Database encoding not conform. Do not use this database
Warning:
Error: Creation of database 'infra.backup.bareos' failed.
Environment
- OS: `Alpine 3.20`
- component:Relevant log output
No response
Relevant traces output
No response
Anything else?
Yes, bug report is for version 22, but i just installed bareos 23 on ubuntu and verified that this script still doesn't have quotes so it won't work in this version too. To fix this you simply need to run:
sed -ie 's|CREATE DATABASE \${db_name}|CREATE DATABASE "\${db_name}"|' /etc/bareos/scripts/create_bareos_database \
sed -ie 's|ALTER DATABASE \${db_name}|ALTER DATABASE "\${db_name}"|' /etc/bareos/scripts/create_bareos_database
I also created a MR #1865.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis addresses a bugThis addresses a bug