Re: bacula-director-pgsql install issues on Lenny+backports
[[ I am not sure if my first post got to the mailing list, so I am doing
the unthinkable and top-posting. Sorry. ]]
Anyway, I figured out a work around. It looks to be a problem in
dbconfig-common, or at least the way that bacula-director-pgsql scripts
calls it. I had to modify the dbconfig-common script that created the
database with this patch...
diff --git a/usr/share/dbconfig-common/internal/pgsql.orig b/usr/share/dbconfig-common/internal/pgsql
index 435216e..ab7549d 100644
--- a/usr/share/dbconfig-common/internal/pgsql.orig
+++ b/usr/share/dbconfig-common/internal/pgsql
@@ -114,7 +114,8 @@ _dbc_createdb(){
if [ "$dbc_pgsql_createdb_encoding" ]; then
extrasql=" WITH ENCODING = '$dbc_pgsql_createdb_encoding'";
fi
- extra="$extra template1"
+ #extra="$extra template1"
+ extrasql="$extrasql TEMPLATE=template0"
_dbc_pgsql_exec_command "CREATE DATABASE \"$dbc_dbname\"$extrasql"
retval=$?
_dbc_psql_cmd_cleanup
The extra= line looks wrong. The "extra" variable is not referenced
anywhere, but I don't feel right about opening a bug on dbconfig-common
because the problem I got was just with backports.
-Bart
* Bart Trojanowski <bart@jukie.net> [101105 12:54]:
> I am running Debian Lenny with backports.
>
> After running bacula with pgsql on vanilla Lenny, I decided to
> upgrade. That failed, due to disk space running out during
> conversion. Oops. It was unrecoverable due to some tables being
> converted and not others. I gave up on that.
>
> I then ran apt-get remove --purge on all pgsql and bacula packages and
> removed all files from /var/lib/postgresql/.
>
> I installed postgresql...
>
> apt-get install -t lenny-backports postgresql-8.3 postgresql-client
> postgresql-client-8.3
>
> And then...
>
> apt-get install -t lenny-backports bacula-common-pgsql
> bacula-director-pgsql
>
> It asked if I wanted to create a database with dbconfig, and I said
> yes. The process failed with this info:
>
> ---- 8< ----
> An error seems to have occurred while installing the database. If it's
> of any help, this was the error encountered:
>
> ERROR: new encoding (SQL_ASCII) is incompatible with the encoding of
> the template database (UTF8) HINT: Use the same encoding as in the
> template database, or use template0 as template.
>
> At this point, you have the option to retry or abort the operation. If
> you choose "retry", you will be prompted with all the configuration
> questions once more and another attempt will be made at performing the
> operation. "retry (skip questions)" will immediately attempt the
> operation again, skipping all questions. If you choose "abort", the
> operation will fail and you will need to downgrade, reinstall,
> reconfigure this package, or otherwise manually intervene to continue
> using it. If you choose "ignore", the operation will continue,
> ignoring further errors from dbconfig-common.
>
> Error installing database for bacula-director-pgsql. Retry?
> ---- 8< ----
>
> Sadly this tells me nothing. What do I do now?
>
> Version numbers are included below. I am leaving the install at the
> prompt, if anyone needs any more info.
>
> Can someone help?
>
> -Bart
>
> -----
>
> # dpkg -l | grep -e bacula -e postgresql -e dbconfig-common
> ii bacula-common 5.0.2-1~bpo50+1 network backup, recovery and verification -
> ii bacula-common-pgsql 5.0.2-1~bpo50+1 network backup, recovery and verification -
> ii bacula-director-common 5.0.2-1~bpo50+1 network backup, recovery and verification -
> iF bacula-director-pgsql 5.0.2-1~bpo50+1 network backup, recovery and verification -
> iU bacula-doc 2.4.4-1 Documentation for Bacula
> ii dbconfig-common 1.8.39 common framework for packaging database appl
> rc postgresql-8.3 8.3.7-0lenny1 object-relational SQL database, version 8.3
> ii postgresql-8.4 8.4.5-1~bpo50+1 object-relational SQL database, version 8.4
> ii postgresql-client-8.4 8.4.5-1~bpo50+1 front-end programs for PostgreSQL 8.4
> ii postgresql-client-common 111~bpo50+1 manager for multiple PostgreSQL client versi
> ii postgresql-common 111~bpo50+1 PostgreSQL database-cluster manager
> ii postgresql-contrib 8.4.5-1~bpo50+1 additional facilities for PostgreSQL (suppor
> ii postgresql-contrib-8.4 8.4.5-1~bpo50+1 additional facilities for PostgreSQL
> iU postgresql-doc 8.4.5-1~bpo50+1 documentation for the PostgreSQL database ma
> iU postgresql-doc-8.4 8.4.5-1~bpo50+1 documentation for the PostgreSQL database ma
>
> --
> WebSig: http://www.jukie.net/~bart/sig/
--
WebSig: http://www.jukie.net/~bart/sig/
Reply to: