Skip to content

Commit

Permalink
debian: set postgres db parameter
Browse files Browse the repository at this point in the history
The Bareos catalog should be created with following settings:
Encoding: SQL_ASCII
Collate:  C
Ctype: C
While all recent versions of dbconfig support the parameter Encoding,
Collate and Ctype are only supported in dbconfig >= 2.0.21.
On older versions, these setting is ignored.
  • Loading branch information
joergsteffens committed Dec 22, 2021
1 parent 3192b1d commit 7858981
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
7 changes: 3 additions & 4 deletions core/README.dbconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ On Debian based systems (Debian, Ubuntu, Univention Corporate Server),
database configuration can be done with help of the dbconfig system.

* Package: dbconfig-common
* Homepage/Documentation: http://people.debian.org/~seanius/policy/dbconfig-common.html/
* Documentation: https://www.debian.org/doc/manuals/dbconfig-common/

Install/update scenarios:
* fresh install
Expand Down Expand Up @@ -84,7 +84,7 @@ postgresql
* update from 13.2:
* db_version is already 2002. It detects, nothing to do.
* update dbconfig already configured
* ?


mysql
=====
Expand All @@ -98,7 +98,7 @@ mysql
* update from 13.2:
* db_version is already 2002. It detects, nothing to do.
* update dbconfig already configured
* ?


sqlite3
=======
Expand All @@ -113,4 +113,3 @@ sqlite3
* db_version is already 2002. It detects, nothing to do.
* creates link from /var/lib/bareos/bareos.db to bareos
* update dbconfig already configured
* ?
16 changes: 14 additions & 2 deletions debian/bareos-database-common.postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,25 @@ if [ -r @scriptdir@/bareos-config-lib.sh ]; then
esac
fi

# dbc_pgsql_createdb_encoding: required for postgresql
# The Bareos catalog should be created with following settings:
# Encoding: SQL_ASCII
# Collate: C
# Ctype: C
# While all recent versions of dbconfig support the parameter Encoding,
# Collate and Ctype are only supported in dbconfig >= 2.0.21.
# On older versions, these setting is ignored.
dbc_pgsql_createdb_encoding="SQL_ASCII"
dbc_pgsql_createdb_collate="C"
dbc_pgsql_createdb_ctype="C"

# dbc_dbfile_owner: only required for sqlite3
dbc_dbfile_owner=`get_user_dir`:`get_group_dir`

# substitution is only done on installs, not on updates!
# While substitution on install is supported
# by all recent versions of dbconfig
# substitution on update requires dbconfig >= 2.0.9.
# As this has not been available on all platforms,
# we use our own substitution mechanism.
#dbc_sql_substitutions="yes"

# run dbconfig
Expand Down

0 comments on commit 7858981

Please sign in to comment.