Hello Uwe,

On 25.08.22 14:25, Uwe Schuerkamp wrote:
Hi folks,

I'm trying (for educational purposes) to migrate an existing bacula
catalog to use with a postgres backend (mariadb10 / postgresql12,
Ubuntu 20.04).


I've imported the bacula catalog using pgloader and this config:

LOAD DATABASE
FROM mysql://bacula:XXXXXXXXXXXXX@localhost/bacula
INTO postgresql://bacula:XXXXXXXXX@localhost/bacula

WITH include drop, create tables, no truncate,
create indexes, reset sequences, foreign keys;


The import works fine, however when connecting to bacula 13.0.1 (compiled
from source for postgres use) I get the following message in bconsole:

25-Aug 14:08 zif-dir JobId 0: Warning: Encoding error for database
"bacula". Wanted SQL_ASCII, got UTF8

The database has to be created with the -E SQL_ASCII, it is done before

you load the catalog I believe. Make sure you use the create_bacula_database

script.


Bacula might have to store characters coming from the different clients (filename and

path mostly), and we have no guarantee that they will be in valid UTF8.

If you try to store only UTF8 filenames, it will be ok, but if one of your 
clients

is in ISO8859-15 for example, it will fail the attribute insertion.

So, the DB has to be created with this attribute.

An other way of solving the issue would have been to escape anything

coming from the client to valid UTF8, but instead, we have changed the

postgresql parameter.

Hope it helps!

Best Regards,

Eric


Most web searches are ancient so I'm wondering if the ASCII bit is
still a valid requirement? In bconsole, the volume, job and client
names all look quite funny when doing a stat dir and the volume isn't
found when I run a backup job (probably due to this encoding issue).


I've also checked the configure script for any options related to the
encoding, but could not find anything, also I've used the provided
create_postgres_database script to (hopefully) initialize the catalog
db in postgres with the correct encoding.

Is there anything I'm doing wrong? Please excuse my ignorance, as I'm
only now getting my feet wet with postgres especially w/r to the
mariadb import...

Thanks in advance & all the best,

Uwe





_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to