Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

2020-01-10 Thread William Muriithi
Happy new year,

> First of all, MariaDB is not very recommended for using with Bacula, but you 
> can use for you own risk.

He can't use mysql 8 with the version of bacula he is deploying, so this 
instruction will lead him to other issues

> This error is it looks is caused by SQL_MODE, that I guess is very similar of 
> MySQL errors. Take a look in the link below:
> https://github.com/wanderleihuttel/bacula-utils/blob/master/dicas/mysql_sql-mode.md

Surprised he is still using the default sql_mode.   I had mentioned it will 
never work with this mode back on November.  Using the mode myself.
"sql_mode = NO_ENGINE_SUBSTITUTION"

Regards,
William

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


Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

2020-01-10 Thread Josh Fisher


On 1/10/2020 6:34 AM, Wanderlei Huttel wrote:

Hello Erwan

First of all, MariaDB is not very recommended for using with Bacula, 
but you can use for you own risk.



This error is it looks is caused by SQL_MODE, that I guess is very 
similar of MySQL errors. Take a look in the link below:
https://github.com/wanderleihuttel/bacula-utils/blob/master/dicas/mysql_sql-mode.md 




Yes, it could be caused by STRICT_TRANS_TABLES being set in SQL_MODE if 
there is no default set for the StartTime column.


However, I have a Bacula instance running on Centos 7 and using MariaDB 
and see that the StartTime column in the Job table indeed does have 
default value set (as NULL). StartTime is a datetime, so I believe the 
default value of NULL is valid and should not be caught by 
STRICT_TRANS_TABLES.


Check the Job table. There should be a default set for StartTime. If 
not, then something created or altered the StartTime column in the Job 
table incorrectly. I believe it should have a default set.





Best regards

*Wanderlei Hüttel*



Em sex., 10 de jan. de 2020 às 07:46, Erwan RIGOLLOT 
mailto:er...@rigollot.eu>> escreveu:


Hi all,

Happy to new year!

So, I have trie with Mariadb Server version: 10.2.29-MariaDB-log.
I have restore bacula database before all my update and run
update_mysql_tables with success.

But, when I start a backup I get this message again :
Fatal error: sql_create.c:84 Create DB Job record INSERT INTO Job
(Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment)
VALUES

('Backup-obiwan.2020-01-10_10.34.15_03','Backup-obiwan','B','I','C','2020-01-10
10:34:14',1578648854,1,'') failed. ERR=Field 'StartTime' doesn't
have a default value

I don't understand. If mysql cause that, why with Mariadb is the
same ?

And in the script update_mysql_table, I see it:
ALTER TABLE Job    ALTER COLUMN StartTime    DROP DEFAULT;

Regards,

Erwan

-Message d'origine-
De : William Muriithi mailto:will...@perasotech.com>>
Envoyé : lundi 23 décembre 2019 15:58
À : Erwan RIGOLLOT mailto:er...@rigollot.eu>>;
bacula-users@lists.sourceforge.net

Objet : Re: /usr/libexec/bacula/update_mysql_tables

Hi Erwan,

Honestly, your problem has nothing to do with bacula, its purely
database related.

First, if you insist on using mysql 8, you can't use the version
you are using.  You need at least Bacula Release 9.4.3.  This is
because you will need this bug fix.

Change mysql my_bool to bool as it was removed from mysql  - Done
on May 2019


Second, the error bacula reported during insert "ERR=Field
'StartTime' doesn't have a default value" is because, previously
mysql used to allow null dates.  Current sql_mode don't allow that
any more.  Google on sql_mode and dates and you should get an idea
on what to do that suites Gentoo.

In short, your pains are all caused by mysql and require just
mysql skills to resolve.

Regards,
William


From: Erwan RIGOLLOT mailto:er...@rigollot.eu>>
Sent: December 23, 2019 9:41 AM
To: bacula-users@lists.sourceforge.net

Subject: Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Hi all,

Anyone can help me ?

Thanks

Erwan

-Message d'origine-
De : Erwan RIGOLLOT mailto:er...@rigollot.eu>>
Envoyé : jeudi 28 novembre 2019 16:18
À : bacula-users@lists.sourceforge.net

Objet : Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Hi William and all,

I have a catalog backup before update.
So I have try this "sql_mode = NO_ENGINE_SUBSTITUTION" because I
would like to keep version of my distribution (gentoo).
(But if i have to do different, i will do).

The script /usr/libexec/bacula/update_mysql_tables run good:
This script will update a Bacula MySQL database from version 12-15
to 16

Depending on the current version of your catalog, you may have to
run this script multiple times.

Enter password:
Enter password:
Update of Bacula MySQL tables 15 to 16 succeeded.
Enter password:

So I try to do backup, and doesn't work :
28-nov. 16:13 obiwan-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

('Backup-tardis.2019-11-28_16.13.50_03','Backup-tardis','B','I','C','2019-11-28
16:13:48',1574954028,5,'') failed. ERR=Field 'StartTime' doesn't
have a default value

I don't understand because the script update_mysql_tables remove
default value ?!?

Can you help me ?

Thanks and have a good day !



-Message d'origine-
De : William Muriithi mailto:will..

Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

2020-01-10 Thread Erwan RIGOLLOT
Sorry for the 3 mails.
I have check in, I can install on Gentoo Bacula-9.4.4-r2 but it's on testing 
state.

It would be better to install this package with Mysql 8 ?

Regards,

-Message d'origine-
De : Erwan RIGOLLOT 
Envoyé : vendredi 10 janvier 2020 14:25
À : 'William Muriithi' ; 'Wanderlei Huttel' 

Cc : 'bacula-users@lists.sourceforge.net' 
Objet : RE: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Oups, I'm sorry.

I check the default conf, and I have this :
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

What should I do ?

Thanks

-Message d'origine-
De : Erwan RIGOLLOT
Envoyé : vendredi 10 janvier 2020 14:22
À : 'William Muriithi' ; Wanderlei Huttel 
 Cc : bacula-users@lists.sourceforge.net
Objet : RE: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Thanks for your help.
I am sorry, I have little difficult with english.

Today, I have install MariaDB without any change of configuration. 
In november, I have understand, perhaps by mystake, I have to change SQL mode 
only for mysql.

So, you suggest me to configure this in MariaDB:
"sql_mode = NO_ENGINE_SUBSTITUTION"
Or
sql_mode = 
"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

After that, is it better to delete database, restore and update again ?

Thanks a lot

-Message d'origine-
De : William Muriithi  Envoyé : vendredi 10 janvier 
2020 13:58 À : Wanderlei Huttel ; Erwan RIGOLLOT 
 Cc : bacula-users@lists.sourceforge.net
Objet : Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Happy new year,

> First of all, MariaDB is not very recommended for using with Bacula, but you 
> can use for you own risk.

He can't use mysql 8 with the version of bacula he is deploying, so this 
instruction will lead him to other issues

> This error is it looks is caused by SQL_MODE, that I guess is very similar of 
> MySQL errors. Take a look in the link below:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fwanderleihuttel%2Fbacula-utils%2Fblob%2Fmaster%2Fdicas%2Fmysq
> l_sql-mode.md&data=02%7C01%7Cerwan%40rigollot.eu%7Cede26fc488cf42e
> d9e1b08d795ccb7dd%7C61b429f8f50a44a2aea1286497c97ee3%7C0%7C1%7C6371425
> 78808408610&sdata=T9pBeTToWlSd2KQjybEhwR9aO9sCSWsildlXngSevd0%3D&a
> mp;reserved=0

Surprised he is still using the default sql_mode.   I had mentioned it will 
never work with this mode back on November.  Using the mode myself.
"sql_mode = NO_ENGINE_SUBSTITUTION"

Regards,
William


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


Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

2020-01-10 Thread Erwan RIGOLLOT
Oups, I'm sorry.

I check the default conf, and I have this :
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

What should I do ?

Thanks

-Message d'origine-
De : Erwan RIGOLLOT 
Envoyé : vendredi 10 janvier 2020 14:22
À : 'William Muriithi' ; Wanderlei Huttel 

Cc : bacula-users@lists.sourceforge.net
Objet : RE: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Thanks for your help.
I am sorry, I have little difficult with english.

Today, I have install MariaDB without any change of configuration. 
In november, I have understand, perhaps by mystake, I have to change SQL mode 
only for mysql.

So, you suggest me to configure this in MariaDB:
"sql_mode = NO_ENGINE_SUBSTITUTION"
Or
sql_mode = 
"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

After that, is it better to delete database, restore and update again ?

Thanks a lot

-Message d'origine-
De : William Muriithi  Envoyé : vendredi 10 janvier 
2020 13:58 À : Wanderlei Huttel ; Erwan RIGOLLOT 
 Cc : bacula-users@lists.sourceforge.net
Objet : Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Happy new year,

> First of all, MariaDB is not very recommended for using with Bacula, but you 
> can use for you own risk.

He can't use mysql 8 with the version of bacula he is deploying, so this 
instruction will lead him to other issues

> This error is it looks is caused by SQL_MODE, that I guess is very similar of 
> MySQL errors. Take a look in the link below:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fwanderleihuttel%2Fbacula-utils%2Fblob%2Fmaster%2Fdicas%2Fmysq
> l_sql-mode.md&data=02%7C01%7Cerwan%40rigollot.eu%7Cede26fc488cf42e
> d9e1b08d795ccb7dd%7C61b429f8f50a44a2aea1286497c97ee3%7C0%7C1%7C6371425
> 78808408610&sdata=T9pBeTToWlSd2KQjybEhwR9aO9sCSWsildlXngSevd0%3D&a
> mp;reserved=0

Surprised he is still using the default sql_mode.   I had mentioned it will 
never work with this mode back on November.  Using the mode myself.
"sql_mode = NO_ENGINE_SUBSTITUTION"

Regards,
William


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


Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

2020-01-10 Thread Erwan RIGOLLOT
Thanks for your help.
I am sorry, I have little difficult with english.

Today, I have install MariaDB without any change of configuration. 
In november, I have understand, perhaps by mystake, I have to change SQL mode 
only for mysql.

So, you suggest me to configure this in MariaDB:
"sql_mode = NO_ENGINE_SUBSTITUTION"
Or
sql_mode = 
"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

After that, is it better to delete database, restore and update again ?

Thanks a lot

-Message d'origine-
De : William Muriithi  
Envoyé : vendredi 10 janvier 2020 13:58
À : Wanderlei Huttel ; Erwan RIGOLLOT 

Cc : bacula-users@lists.sourceforge.net
Objet : Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Happy new year,

> First of all, MariaDB is not very recommended for using with Bacula, but you 
> can use for you own risk.

He can't use mysql 8 with the version of bacula he is deploying, so this 
instruction will lead him to other issues

> This error is it looks is caused by SQL_MODE, that I guess is very similar of 
> MySQL errors. Take a look in the link below:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fwanderleihuttel%2Fbacula-utils%2Fblob%2Fmaster%2Fdicas%2Fmysql_sql-mode.md&data=02%7C01%7Cerwan%40rigollot.eu%7Cede26fc488cf42ed9e1b08d795ccb7dd%7C61b429f8f50a44a2aea1286497c97ee3%7C0%7C1%7C637142578808408610&sdata=T9pBeTToWlSd2KQjybEhwR9aO9sCSWsildlXngSevd0%3D&reserved=0

Surprised he is still using the default sql_mode.   I had mentioned it will 
never work with this mode back on November.  Using the mode myself.
"sql_mode = NO_ENGINE_SUBSTITUTION"

Regards,
William


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


Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

2020-01-10 Thread Wanderlei Huttel
Hello Erwan

First of all, MariaDB is not very recommended for using with Bacula, but
you can use for you own risk.


This error is it looks is caused by SQL_MODE, that I guess is very similar
of MySQL errors. Take a look in the link below:
https://github.com/wanderleihuttel/bacula-utils/blob/master/dicas/mysql_sql-mode.md


Best regards

*Wanderlei Hüttel*



Em sex., 10 de jan. de 2020 às 07:46, Erwan RIGOLLOT 
escreveu:

> Hi all,
>
> Happy to new year!
>
> So, I have trie with Mariadb Server version: 10.2.29-MariaDB-log.
> I have restore bacula database before all my update and run
> update_mysql_tables with success.
>
> But, when I start a backup I get this message again :
> Fatal error: sql_create.c:84 Create DB Job record INSERT INTO Job
> (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES
> ('Backup-obiwan.2020-01-10_10.34.15_03','Backup-obiwan','B','I','C','2020-01-10
> 10:34:14',1578648854,1,'') failed. ERR=Field 'StartTime' doesn't have a
> default value
>
> I don't understand. If mysql cause that, why with Mariadb is the same ?
>
> And in the script update_mysql_table, I see it:
> ALTER TABLE JobALTER COLUMN StartTimeDROP DEFAULT;
>
> Regards,
>
> Erwan
>
> -Message d'origine-
> De : William Muriithi 
> Envoyé : lundi 23 décembre 2019 15:58
> À : Erwan RIGOLLOT ; bacula-users@lists.sourceforge.net
> Objet : Re: /usr/libexec/bacula/update_mysql_tables
>
> Hi Erwan,
>
> Honestly, your problem has nothing to do with bacula, its purely database
> related.
>
> First, if you insist on using mysql 8, you can't use the version you are
> using.  You need at least Bacula Release 9.4.3.  This is because you will
> need this bug fix.
>
> Change mysql my_bool to bool as it was removed from mysql  - Done on May
> 2019
>
>
> Second, the error bacula reported during insert "ERR=Field 'StartTime'
> doesn't have a default value" is because, previously mysql used to allow
> null dates.  Current sql_mode don't allow that any more.  Google on
> sql_mode and dates and you should get an idea on what to do that suites
> Gentoo.
>
> In short, your pains are all caused by mysql and require just mysql skills
> to resolve.
>
> Regards,
> William
>
> 
> From: Erwan RIGOLLOT 
> Sent: December 23, 2019 9:41 AM
> To: bacula-users@lists.sourceforge.net
> Subject: Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables
>
> Hi all,
>
> Anyone can help me ?
>
> Thanks
>
> Erwan
>
> -Message d'origine-
> De : Erwan RIGOLLOT 
> Envoyé : jeudi 28 novembre 2019 16:18
> À : bacula-users@lists.sourceforge.net
> Objet : Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables
>
> Hi William and all,
>
> I have a catalog backup before update.
> So I have try this "sql_mode = NO_ENGINE_SUBSTITUTION" because I would
> like to keep version of my distribution (gentoo).
> (But if i have to do different, i will do).
>
> The script /usr/libexec/bacula/update_mysql_tables run good:
> This script will update a Bacula MySQL database from version 12-15 to 16
>
> Depending on the current version of your catalog, you may have to run this
> script multiple times.
>
> Enter password:
> Enter password:
> Update of Bacula MySQL tables 15 to 16 succeeded.
> Enter password:
>
> So I try to do backup, and doesn't work :
> 28-nov. 16:13 obiwan-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
> ('Backup-tardis.2019-11-28_16.13.50_03','Backup-tardis','B','I','C','2019-11-28
> 16:13:48',1574954028,5,'') failed. ERR=Field 'StartTime' doesn't have a
> default value
>
> I don't understand because the script update_mysql_tables remove default
> value ?!?
>
> Can you help me ?
>
> Thanks and have a good day !
>
>
>
> -Message d'origine-
> De : William Muriithi  Envoyé : vendredi 22
> novembre 2019 16:41 À : Erwan RIGOLLOT ;
> bacula-users@lists.sourceforge.net
> Objet : Re: /usr/libexec/bacula/update_mysql_tables
>
>
> Hi Erwan,
>
> Hope you had made a catalog backup before schema upgrade.
>
> You can't use bacula 9.0 with mysql 8.   mysql made some change that were
> only fixed in a later bacula version, think bacula 9.2.
>
> So if you have to use mysql 8, please use the latest bacula binaries.
> Alternatively, use Mariadb, which would be my advice as it don't change
> your plans at all.
>
> Also, change the sql mode to match that of earlier versions.  Something
> like this "sql_mode = NO_ENGINE_SUBSTITUTION"
>
> Anyway, all this depends on whether you have a backup.
>
> Regard,
> William
>
>
>
>
>
>
> From: Erwan RIGOLLOT 
>
> Sent: November 22, 2019 9:50 AM
>
> To: bacula-users@lists.sourceforge.net  >
>
> Subject: [Bacula-users] /usr/libexec/bacula/update_mysql_tables
>
>
>
>
> Hello,
>
> I have try to update bacula database after update Mysql (8.0.17) and
> bacula ( 9.0.8-r1).
>
> I have get this result and backup don't work  :
>
>
> This script will 

Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

2020-01-10 Thread Erwan RIGOLLOT
Hi all,

Happy to new year! 

So, I have trie with Mariadb Server version: 10.2.29-MariaDB-log.
I have restore bacula database before all my update and run update_mysql_tables 
with success.

But, when I start a backup I get this message again :
Fatal error: sql_create.c:84 Create DB Job record INSERT INTO Job 
(Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES 
('Backup-obiwan.2020-01-10_10.34.15_03','Backup-obiwan','B','I','C','2020-01-10 
10:34:14',1578648854,1,'') failed. ERR=Field 'StartTime' doesn't have a default 
value

I don't understand. If mysql cause that, why with Mariadb is the same ?

And in the script update_mysql_table, I see it:
ALTER TABLE JobALTER COLUMN StartTimeDROP DEFAULT;

Regards,

Erwan

-Message d'origine-
De : William Muriithi  
Envoyé : lundi 23 décembre 2019 15:58
À : Erwan RIGOLLOT ; bacula-users@lists.sourceforge.net
Objet : Re: /usr/libexec/bacula/update_mysql_tables

Hi Erwan,

Honestly, your problem has nothing to do with bacula, its purely database 
related.

First, if you insist on using mysql 8, you can't use the version you are using. 
 You need at least Bacula Release 9.4.3.  This is because you will need this 
bug fix.

Change mysql my_bool to bool as it was removed from mysql  - Done on May 2019


Second, the error bacula reported during insert "ERR=Field 'StartTime' doesn't 
have a default value" is because, previously mysql used to allow null dates.  
Current sql_mode don't allow that any more.  Google on sql_mode and dates and 
you should get an idea on what to do that suites Gentoo.

In short, your pains are all caused by mysql and require just mysql skills to 
resolve.

Regards,
William


From: Erwan RIGOLLOT 
Sent: December 23, 2019 9:41 AM
To: bacula-users@lists.sourceforge.net
Subject: Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Hi all,

Anyone can help me ?

Thanks

Erwan

-Message d'origine-
De : Erwan RIGOLLOT 
Envoyé : jeudi 28 novembre 2019 16:18
À : bacula-users@lists.sourceforge.net
Objet : Re: [Bacula-users] /usr/libexec/bacula/update_mysql_tables

Hi William and all,

I have a catalog backup before update.
So I have try this "sql_mode = NO_ENGINE_SUBSTITUTION" because I would like to 
keep version of my distribution (gentoo).
(But if i have to do different, i will do).

The script /usr/libexec/bacula/update_mysql_tables run good:
This script will update a Bacula MySQL database from version 12-15 to 16

Depending on the current version of your catalog, you may have to run this 
script multiple times.

Enter password:
Enter password:
Update of Bacula MySQL tables 15 to 16 succeeded.
Enter password:

So I try to do backup, and doesn't work :
28-nov. 16:13 obiwan-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 
('Backup-tardis.2019-11-28_16.13.50_03','Backup-tardis','B','I','C','2019-11-28 
16:13:48',1574954028,5,'') failed. ERR=Field 'StartTime' doesn't have a default 
value

I don't understand because the script update_mysql_tables remove default value 
?!?

Can you help me ?

Thanks and have a good day !



-Message d'origine-
De : William Muriithi  Envoyé : vendredi 22 novembre 
2019 16:41 À : Erwan RIGOLLOT ; 
bacula-users@lists.sourceforge.net
Objet : Re: /usr/libexec/bacula/update_mysql_tables


Hi Erwan,

Hope you had made a catalog backup before schema upgrade.

You can't use bacula 9.0 with mysql 8.   mysql made some change that were only 
fixed in a later bacula version, think bacula 9.2.

So if you have to use mysql 8, please use the latest bacula binaries.  
Alternatively, use Mariadb, which would be my advice as it don't change your 
plans at all.

Also, change the sql mode to match that of earlier versions.  Something like 
this "sql_mode = NO_ENGINE_SUBSTITUTION"

Anyway, all this depends on whether you have a backup.

Regard,
William






From: Erwan RIGOLLOT 

Sent: November 22, 2019 9:50 AM

To: bacula-users@lists.sourceforge.net 

Subject: [Bacula-users] /usr/libexec/bacula/update_mysql_tables




Hello,

I have try to update bacula database after update Mysql (8.0.17) and bacula ( 
9.0.8-r1).

I have get this result and backup don't work  :


This script will update a Bacula MySQL database from version 12-15 to 16

Depending on the current version of your catalog, you may have to run this 
script multiple times.

mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1067 (42000) at line 3: Invalid default value for 'FirstWritten'
ERROR 1060 (42S21) at line 4: Duplicate column name 'VolParts'
ERROR 1067 (42000) at line 5: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 6: Invalid default value for 'FirstWritten'
ERROR 1067 (42000) at line 7: Invalid default value for 'FirstWritte

[Bacula-users] Issue with config setting "Max Virtual Full Interval"

2020-01-10 Thread Shaligram Bhagat, Yateen (Nokia - IN/Bangalore)
Hi all,

I am using bacula v 9.4.4 on Centos 6.4. for disk file based backup.

The backup scheme is weekdays incremental and virtual full back-up on Sunday.

Job {
  Name = "blhwsync11"
  Max Virtual Full Interval = 7 days
  Accurate = no# With Accurate = yes, even file deletions, move etc are 
covered in differential/incremental backup
  ##Backups To Keep = 3  # default = 0, means all incremental backups till the 
VirtualFull are consolidated
  DeleteConsolidatedJobs = yes
  JobDefs = "blhwsync11"
  RunBeforeJob = "/opt/bacula/srpg/scripts/validate_testbed.sh blhwsync11"
  }

Things were running fine till the interval between the last virtual full back 
up job and the current incremental job was less than Max Virtual Full Interval 
= 7 days

When this interval exceeded Max Virtual Full Interval = 7 days ;  for an 
incremental backup, bacula tried to create a new virtual full backup by 
consolidating the latest virtual full backup and all subsequent incremental 
backups (...fair enough this is as expected)
But while consolidating the jobs ; it gave error :

10-Jan 13:53 bacula-server-dir JobId 5737: shell command: run AfterJob 
"/opt/bacula/srpg/scripts/send_fail_mail.sh 5737 
blhwsync11.2020-01-10_13.53.18_22 sas-backup-ad...@list.nokia.com"
10-Jan 13:54 bacula-server-dir JobId 5738: 10-Jan 13:54 bacula-server-dir JobId 
5738: No prior or suitable Full backup found in catalog. Doing Virtual FULL 
backup.
10-Jan 13:54 bacula-server-dir JobId 5738: shell command: run BeforeJob 
"/opt/bacula/srpg/scripts/validate_testbed.sh blhwsync11"
10-Jan 13:54 bacula-server-dir JobId 5738: Start Virtual Backup JobId 5738, 
Job=blhwsync11.2020-01-10_13.54.16_04
10-Jan 13:54 bacula-server-dir JobId 5738: Warning: This Job is not an Accurate 
backup so is not equivalent to a Full backup.
10-Jan 13:54 bacula-server-dir JobId 5738: Consolidating 
JobIds=4739,5004,5216,5389
10-Jan 13:54 bacula-server-dir JobId 5738: Found 43700 files to consolidate 
into Virtual Full.
10-Jan 13:54 bacula-server-dir JobId 5738: Using Device "DeviceF1" to write.
10-Jan 13:54 bacula-server-sd JobId 5738: Fatal error: Read and write devices 
not properly initialized.
10-Jan 13:54 bacula-server-sd JobId 5738: Elapsed time=438512:24:21, Transfer 
rate=0  Bytes/second
10-Jan 13:54 bacula-server-dir JobId 5738: Error: Bacula bacula-server-dir 
9.4.4 (28May19):
  Build OS:   x86_64-redhat-linux-gnu-bacula redhat
  JobId:  5738
  Job:blhwsync11.2020-01-10_13.54.16_04
  Backup Level:   Virtual Full
  Client: "blhwsync11-fd" 9.4.4 (28May19) 
x86_64-redhat-linux-gnu-bacula,redhat,
  FileSet:"blhwsync11" 2019-12-10 22:00:01
 Pool:   "TestbedFull-F" (From Job VFullPool override)
  Catalog:"MyCatalog" (From Client resource)
  Storage:"StorageF" (From Pool resource)
  Scheduled time: 10-Jan-2020 13:54:14
  Start time: 08-Jan-2020 22:00:02
  End time:   08-Jan-2020 22:00:14
  Elapsed time:   12 secs
  Priority:   10
  SD Files Written:   0
  SD Bytes Written:   0 (0 B)
  Rate:   0.0 KB/s
  Volume name(s):
  Volume Session Id:  1
  Volume Session Time:1578644639
  Last Volume Bytes:  1 (1 B)
  SD Errors:  1
  SD termination status:  Error
  Termination:*** Backup Error ***

Later I tried running the virtual full backup "explicitly" to consolidate the 
last virtual full and subsequent incremental jobs. This went through fine 
without any errors.

So the issue seems to be in the Bacula's handling of the configuration setting 
: "Max Virtual Full Interval "  ?
Any advice ?

Thanks,
Yateen

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