Hello Marcin, Thanks, this explains it pretty good.
In the meantime I created a new datebase using make_mysql_tables and made a quick comparison of both schemas using mysqldump -d . I found some more (hopefully) minor differences (order of columns, int(11) vs. int(10) unsigned, missing indexes). Not sure if everything is related to bacula update scripts because we run bacula quite a long time and did a lot of bacula version updates, but also operating system and mysql/mariadb upgrades. Best regards Ulrich ________________________________ Von: Marcin Haba <ganius...@gmail.com> Gesendet: Samstag, 18. Mai 2024 10:37 An: Ulrich Leodolter <ulrich.leodol...@obvsg.at> Cc: bacula-devel@lists.sourceforge.net <bacula-devel@lists.sourceforge.net> Betreff: Re: [Bacula-devel] database problem update after upgrade to 15.0.2 Hello Ulrich, I know this problem. I found and reported it a year ago. You can read about it here: https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/issues/2684 Best regards, Marcin Haba (gani) On Sat, 18 May 2024 at 10:18, Ulrich Leodolter <ulrich.leodol...@obvsg.at<mailto:ulrich.leodol...@obvsg.at>> wrote: hi, after upgrading to verions 15.0.2 our nightly update stats job failed: 18-May 06:15 vlbackup.obvsg.at-dir JobId 0: Fatal error: bdb.h:146 bdb.h:146 query INSERT INTO JobHisto (JobId, Job, Name, Type, Level,ClientId, JobStatus,SchedTime, StartTime, EndTime, RealEndTime, RealStartTime, JobTDate,VolSessionId, VolSessionTime, JobFiles, JobBytes, ReadBytes,JobErrors, JobMissingFiles, PoolId, FileSetId, PriorJobId, PriorJob, PurgedFiles, HasBase, HasCache, Reviewed, Comment, FileTable, isVirtualFull,CompressRatio,Rate,LastReadStorageId,WriteStorageId,LastReadDevice,WriteDevice,StatusInfo,Encrypted)SELECT JobId, Job, Name, Type, Level, ClientId, JobStatus,SchedTime, StartTime, EndTime, RealEndTime, RealStartTime, JobTDate,VolSessionId, VolSessionTime, JobFiles, JobBytes, ReadBytes,JobErrors, JobMissingFiles, PoolId, FileSetId, PriorJobId, PriorJob, PurgedFiles, HasBase, HasCache, Reviewed, Comment, FileTable, isVirtualFull,CompressRatio,Rate,LastReadStorageId,WriteStorageId,LastReadDevice,WriteDevice,StatusInfo,Encrypted FROM Job WHERE JobStatus IN ('T','W','f ,'A','E')AND NOT EXISTS (SELECT JobHisto.JobId FROM JobHisto WHERE JobHisto.Jobid=Job.JobId)AND JobTDate < 1715746502 failed: Unknown column 'FileTable' in 'field list' after upgrading to version 15.0.2 i have updated the database using the update_mysql_tables which is installed into scripts directory. the source code of this script is bacula/src/cats/update_mysql_tables.in<http://update_mysql_tables.in>, but there are also scripts to upgrade between specific versions in bacula/updatedb. it seems these update scripts are not in sync because only bacula/src/cats/update_mysql_tables.in<http://update_mysql_tables.in> contains the FileTable update: ALTER TABLE Job ADD COLUMN FileTable CHAR(20) default 'File'; ALTER TABLE JobHisto ADD COLUMN FileTable CHAR(20) default 'File'; there is no such alter FileTable in any of the bacula/updatedb scripts. it seems it is not a good idea to use scripts from bacula/updatedb after version upgrade because of missing changes, is that correct? i have now added the columns manually und update stats job runs with problems, but i need now the check the complete schema because i am unsure which scripts i used in the past. Best regards Ulrich _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net<mailto:Bacula-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/bacula-devel -- "Greater love hath no man than this, that a man lay down his life for his friends." Jesus Christ "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie za przyjaciół swoich." Jezus Chrystus
_______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel