Phil, thanks! However, still two issues.
bacula-users-requ...@lists.sourceforge.net wrote on 05/03/2018 05:33 AM:
On 04/30/18 09:43, Ken Mandelberg wrote:
I did a Ubuntu update from 16.04 to 18.04. The automatic Bacula update
as part of the OS upgrade partially failed.
After the upgrade I found myself with
bacula-dir JobId 0: Fatal error: Version error for database "bacula".
Wanted 16, got 14
So I ran
/usr/share/bacula-director/update_mysql_tables
I had to change db_name in the script to "bacula", but it seemed to have
worked and the the director was able to start.
However, when it was time for its first backup job
29-Apr 23:05 orac-dir JobId 0: Fatal error: sql_create.c:84 Create DB
Job record INSERT INTO Job
(Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment)
VALUES
('BackupClient1.2018-04-29_23.05.00_03','BackupClient1','B','D','C','2018-04-29
23:05:00',1525057500,1,'') failed. ERR=Incorrect datetime value:
'0000-00-00 00:00:00' for column 'StartTime' at row 1
This most likely means that Ubuntu 18.04 updated you to MySQL 5.7 or its
MariaDB equivalent (10.2.x).
Yes mysql 5.7.22
Find your MySQL/MariaDB configuration file[s] and look for the line that
sets SQL_MODE. (There may not be one, especially if you've never tuned
it.) Log into MySQL and run this query:
SELECT @@GLOBAL.sql_mode;
Take the result, REMOVE the terms NO_ZERO_DATE and NO_ZERO_IN_DATE, and
set what is left as your new SQL_MODE. For example:
SET GLOBAL sql_mode =
'STRICT_ALL_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
(If in doubt, the above example is a good starting point.)
This worked in my case
SET GLOBAL sql_mode
='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
Add a line to your MySQL configuration setting the same, so that it will
persist across restarts:
This should get you up and running. You probably want to restart Bacula
just to be safe.
-- Phil Stracchino Babylon Communications ph...@caerllewys.net
p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958
SQL_MODE = STRICT_ALL_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
(This goes in the [mysqld] section)
Had a problem with this. I added to /etc/mysql/mysql.conf/mysqld.conf.
Here is a few lines
[mysqld]
#
# * Basic Settings
SQL_MODE =
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO
_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
With this mysqld always fails apparently with
018-05-04T15:55:57.823432Z 0 [ERROR] unknown variable
'SQL_MODE=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
Aside from the startup problem, with sql_mode set dynamically to avoid
the zero date issue, I still have another
one. Bacula does a QUERY to Media with a large number of fields which
includes VolType, but gets
Unknown column 'VolType' in 'field list'
------------------------------------------------------------------------------
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