Re: [Bacula-users] Errors migrating from mysql to postgres
>> -Original Message- >> From: Dan Langille [mailto:d...@langille.org] >> Sent: Monday, November 27, 2017 1:29 PM >> To: Michel Figgins >> Cc: bacula-users >> Subject: Re: [Bacula-users] Errors migrating from mysql to postgres >> >>> On Nov 27, 2017, at 2:13 PM, Michel Figgins >>> wrote: >>> >>> Hello, >>> I'm trying to migrate from a mysql backend to a postgresql backend and >>> I'm getting an error importing the RestoreObject table. Specifically I'm >>> getting : >>> ERROR: invalid input syntax for type bytea LINE 1: >>> ...bjectCompression) VALUES (1588,'job_metadata.xml','>> Googling around leads me to believe that Postgres isn't liking the >>> format of RestoreObject field, but I'm stumped as to how to change it. >>> So my questions: Can anyone suggest a way to modify the INSERT >>> statement to one Postgres will understand? Do I actually need to import >>> this table, or will the entries get re-populated as successful backups are >>> completed? >>> Additional Info: >>> This is on Fedora 27, Bacula version is 9.0.5, the MySQL database is >>> MariaDB 10.2.9, the PostgreSQL database is 9.6.6. The mysqldump command >>> used to generate the import file is : >>> mysqldump -t -n -c -e --compatible=postgresql --skip-quote-names --skip-opt >>> --disable-keys --lock-tables -u bacula -pX bacula | grep -v "INSERT >>> INTO Status" | sed -e 's/-00-00 00:00:00/1970-01-01 00:00:00/g' | >>> sed -e 's/\\0//' | sed -e "s#\\\'#\'\'#g" > bacula-export.sql >>> The pqsl command used to import the dump is: >>> psql -Ubacula bacula < bacula-export.sql >> >> Can you confirm your PostgreSQL is SQL_ASCII? >> >> $ psql -l >> List of databases >> Name | Owner | Encoding | Collate | Ctype | Access >> privileges >> --+--+---+-+---+ >> --+--+---+-+---+--- >> bacula | bacula | SQL_ASCII | C | C | >> >> >> > > > On Nov 27, 2017, at 7:25 PM, Michel Figgins wrote: > > Yes, it is: > postgres=# \l > List of databases > Name| Owner | Encoding | Collate |Ctype| Access > privileges > ---+--+---+-+-+--- > bacula| bacula | SQL_ASCII | C | C | =Tc/bacula > + > | | | | | > bacula=C*T*c*/bacula > The only other idea I have is escape notation. That would give you: VALUES (1588,'job_metadata.xml',E'http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Errors migrating from mysql to postgres
Yes, it is: postgres=# \l List of databases Name| Owner | Encoding | Collate |Ctype| Access privileges ---+--+---+-+-+--- bacula| bacula | SQL_ASCII | C | C | =Tc/bacula + | | | | | bacula=C*T*c*/bacula -Original Message- From: Dan Langille [mailto:d...@langille.org] Sent: Monday, November 27, 2017 1:29 PM To: Michel Figgins Cc: bacula-users Subject: Re: [Bacula-users] Errors migrating from mysql to postgres > On Nov 27, 2017, at 2:13 PM, Michel Figgins wrote: > > Hello, > I'm trying to migrate from a mysql backend to a postgresql backend and > I'm getting an error importing the RestoreObject table. Specifically I'm > getting : > ERROR: invalid input syntax for type bytea LINE 1: > ...bjectCompression) VALUES (1588,'job_metadata.xml',' Googling around leads me to believe that Postgres isn't liking the > format of RestoreObject field, but I'm stumped as to how to change it. > So my questions: Can anyone suggest a way to modify the INSERT > statement to one Postgres will understand? Do I actually need to import this > table, or will the entries get re-populated as successful backups are > completed? > Additional Info: > This is on Fedora 27, Bacula version is 9.0.5, the MySQL database is MariaDB > 10.2.9, the PostgreSQL database is 9.6.6. The mysqldump command used to > generate the import file is : > mysqldump -t -n -c -e --compatible=postgresql --skip-quote-names --skip-opt > --disable-keys --lock-tables -u bacula -pX bacula | grep -v "INSERT > INTO Status" | sed -e 's/-00-00 00:00:00/1970-01-01 00:00:00/g' | sed > -e 's/\\0//' | sed -e "s#\\\'#\'\'#g" > bacula-export.sql > The pqsl command used to import the dump is: > psql -Ubacula bacula < bacula-export.sql Can you confirm your PostgreSQL is SQL_ASCII? $ psql -l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges --+--+---+-+---+ --+--+---+-+---+--- bacula | bacula | SQL_ASCII | C | C | -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Errors migrating from mysql to postgres
> On Nov 27, 2017, at 2:13 PM, Michel Figgins wrote: > > Hello, > I'm trying to migrate from a mysql backend to a postgresql backend and > I'm getting an error importing the RestoreObject table. Specifically I'm > getting : > ERROR: invalid input syntax for type bytea > LINE 1: ...bjectCompression) VALUES (1588,'job_metadata.xml',' Googling around leads me to believe that Postgres isn't liking the > format of RestoreObject field, but I'm stumped as to how to change it. > So my questions: Can anyone suggest a way to modify the INSERT > statement to one Postgres will understand? Do I actually need to import this > table, or will the entries get re-populated as successful backups are > completed? > Additional Info: > This is on Fedora 27, Bacula version is 9.0.5, the MySQL database is MariaDB > 10.2.9, the PostgreSQL database is 9.6.6. The mysqldump command used to > generate the import file is : > mysqldump -t -n -c -e --compatible=postgresql --skip-quote-names --skip-opt > --disable-keys --lock-tables -u bacula -pX bacula | grep -v "INSERT > INTO Status" | sed -e 's/-00-00 00:00:00/1970-01-01 00:00:00/g' | sed > -e 's/\\0//' | sed -e "s#\\\'#\'\'#g" > bacula-export.sql > The pqsl command used to import the dump is: > psql -Ubacula bacula < bacula-export.sql Can you confirm your PostgreSQL is SQL_ASCII? $ psql -l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges --+--+---+-+---+--- bacula | bacula | SQL_ASCII | C | C | -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Errors migrating from mysql to postgres
Hello, I'm trying to migrate from a mysql backend to a postgresql backend and I'm getting an error importing the RestoreObject table. Specifically I'm getting : ERROR: invalid input syntax for type bytea LINE 1: ...bjectCompression) VALUES (1588,'job_metadata.xml',' bacula-export.sql The pqsl command used to import the dump is: psql -Ubacula bacula < bacula-export.sql Thanks, Michel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-fd filed on AIX xacl_aix missing.
Hi Nicolás, > I downloaded bacula 9.0.6 as suggested but the problem is still there, > only this time the files and missing symbol start with a "b" instead of an > "x". Look: [...] > And now my question woud be where do I find bacl_aix.[ch]? you should be able to compile without acl and xattr by using these configure options: --disable-acl --disable-xattr I don't know what happens if you try to restore existing backups that contain acl and xattr data. The code was rewritten or restructured, but the functions were not implemented for all previously supported operating systems. Regards, Carsten -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Problems with version 9.0.3 failing since the upgrade
list, bacula 9.0.3 mariadb 10.2.8 centos 6.9 I upgraded bacula from 5.2.13 which worked very well, to version 9.0.3. Basically installed new version from source and then upgraded the database structure. The source was compiled with the following: ./configure --sbindir=/usr/bacula/bin --sysconfdir=/usr/bacula/bin --with-pid-dir=/var/run/bacula --with-subsys-dir=/var/run/bacula/working --enable-smartalloc --with-mysql --with-working-dir=/usr/bacula/bin/working --with-dump-email=u...@domain.com --with-job-email=u...@domain.com --with-smtp-host=smtp.googlemail.com --enable-bat The problem started with my offsite backups. I will get the following error: 13-Nov 01:18 distress JobId 33429: Fatal error: Socket error on Data received command: ERR=No data available 13-Nov 01:18 distress JobId 33429: Fatal error: fd_cmds.c:157 Read data not accepted And the backup fails. Most of the time it is on a backup that spans multiple disks. So, I chatted with the ATTO raid support folks and they suggested that I use a different hotswap raid enclosure due to the one I was using was not very reliable in their opinion. Although this enclosure had worked very reliably for well into 10 years without a problem! So, I moved the system to a completely new system ( Supermicro with ATTO raid ). The problem still persists! I have rebuilt the raid disk structure and changed the working of the backups. To no avail! My backups worked flawlessly before the upgrade! Once going to v 9 I can not count how many offsite backups the have failed to complete with this type of error. I also get 13-Nov 01:23 distress JobId 33430: Warning: mount.c:210 Open of File device "BottomSwap" (/BottomSwap) Volume "dcBS-104" failed: ERR=file_dev.c:190 Could not open(/BottomSwap/dcBS-104,OPEN_READ_WRITE,0640): ERR=No such file or directory and 15-Nov 17:20 kilchis JobId 35825: Error: bsock.c:849 Read error from Storage daemon:kilchis:9103: ERR=Connection reset by peer 15-Nov 17:20 kilchis JobId 35825: Fatal error: append.c:271 Network error reading from FD. ERR=Connection reset by peer All of this happens on one storage server, well actually two storage servers but they service two different subnets/domains. It all started with the upgrade! please, tell me that you have fixed this with a new version! thanks -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-fd filed on AIX xacl_aix missing.
Hello. I downloaded bacula 9.0.6 as suggested but the problem is still there, only this time the files and missing symbol start with a "b" instead of an "x". Look: Compiling bacl.c bacl.c: In function 'void* new_bacl()': bacl.c:764:15: error: expected type-specifier before 'BACL_AIX' bacl.c:764:15: error: expected ';' before 'BACL_AIX' bacl.c:764:24: error: 'BACL_AIX' was not declared in this scope make: The error code from the last command is 1. Stop. == Error in /tmp/bacula-9.0.6/src/filed == make: The error code from the last command is 1. Stop. (root@aix-testing) /tmp/bacula-9.0.6> find . -name 'bacl*' ./src/filed/bacl.c ./src/filed/bacl.h ./src/filed/bacl_freebsd.c ./src/filed/bacl_freebsd.h ./src/filed/bacl_linux.c ./src/filed/bacl_linux.h ./src/filed/bacl_osx.c ./src/filed/bacl_osx.h ./src/filed/bacl_solaris.c ./src/filed/bacl_solaris.h (root@aix-testing) /tmp/bacula-9.0.6> And now my question woud be where do I find bacl_aix.[ch]? Thanks in advance. -- De: Radosław Korzeniewski Para: Nicolás Conde cc: bacula-users Fecha: 21/11/2017 19:32 Asunto: Re: [Bacula-users] bacula-fd filed on AIX xacl_aix missing. Hello, 2017-11-21 19:03 GMT+01:00 Nicolás Conde : Hello list members. I'm trying to build bacula-fd 9.0.3 from sources on AIX 7.1 with GCC compiler ver. 4.7.3 from perzl.org. It is fixed in current git code and will be released with 9.0.6. best regards -- Radosław Korzeniewski rados...@korzeniewski.net El presente correo y cualquier posible archivo adjunto están dirigidos únicamente al destinatario del mensaje y contiene información que puede ser confidencial. Si Ud. no es el destinatario correcto por favor notifique al remitente respondiendo anexando este mensaje y elimine inmediatamente el e-mail y los posibles archivos adjuntos al mismo de su sistema. Está prohibida cualquier utilización, difusión o copia de este e-mail por cualquier persona o entidad que no sean las específicas destinatarias del mensaje. OSE no acepta ninguna responsabilidad con respecto a cualquier comunicación que haya sido emitida incumpliendo nuestra Política de Seguridad de la Información y la Ley de Protección de Datos y Acción de Habeas Data Nş 18.331. This e-mail and any attachment are confidential and are intended solely for the addressee(s). If you are not intended recipient please inform the sender immediately, answering this e-mail and delete it as well as the attached files. Any use, circulation or copy of this e-mail by any person or entity that is not the specific addressee(s) is prohibited. OSE is not responsible for any communication emitted without respecting our Information Security Policy and the Data Protection Act and Habeas Data Action No. 18.331. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users