Hello, RHEL7/CentOS7 comes with MariaDB instead of MySQL, this detail is not mentioned in the Bareos documentation. Using the mariadb packages from CentOS 7 is known to work fine with Bareos. Looks like the latest MySQL version has changed in a way that is not compatible with older versions.
Regards, Stephan On 11/17/2015 10:25 PM, Christopher Lamitie wrote: > Hello Bareos users > > I'm doing a new, first time install of Bareos on CentOS7 with MySQL community > server 5.7.9. I have been following the tutorial at > http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-590005 > > I've run into an issue that's not covered in the tutorial > > When I execute the script at /usr/lib/bareos/scripts/make_bareos_tables I get > the following output > > Making mysql tables > ERROR 1067 (42000) at line 88: Invalid default value for 'CleaningDate' > ERROR 1067 (42000) at line 107: Invalid default value for 'SchedTime' > ERROR 1067 (42000) at line 140: Invalid default value for 'SchedTime' > ERROR 1067 (42000) at line 180: Invalid default value for 'Date' > ERROR 1067 (42000) at line 192: Invalid default value for 'CreateTime' > ERROR 1067 (42000) at line 215: Invalid default value for 'FirstWritten' > ERROR 1067 (42000) at line 310: Invalid default value for 'Time' > ERROR 1171 (42000) at line 379: All parts of a PRIMARY KEY must be NOT NULL; > if you need NULL in a key, use UNIQUE instead > Creation of Bareos MySQL tables succeeded. > > However I can move on and execute the > /usr/lib/bareos/scripts/grant_bareos_privileges script. > > I can then start dir, fd and sd daemons and connect to the bconsole. when I > run the default job as the tutorial says, it fails. The tutorial says it > will fail but as I was looking at the messages I saw many entries such as > these: > > 17-Nov 15:14 bareos-dir-test-dir JobId 0: Fatal error: sql_find.c:375 > sql_find.c:375 query SELECT > MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,MediaType,VolStatus,PoolId,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,InChanger,EndFile,EndBlock,LabelType,LabelDate,StorageId,Enabled,LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId,VolReadTime,VolWriteTime,ActionOnPurge,EncryptionKey,MinBlocksize,MaxBlocksize > FROM Media WHERE PoolId=3 AND MediaType='File' AND Enabled=1 AND > VolStatus='Purged' AND Recycle=1 ORDER BY LastWritten ASC,MediaId LIMIT 1 > failed: > Table 'bareos.Media' doesn't exist > 17-Nov 15:14 bareos-dir-test-dir JobId 0: Fatal error: sql_create.c:100 > Create DB Job record INSERT INTO Job > (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES > ('BackupClient1.2015-11-17_15.14.50_04','BackupClient1','B','I','C','2015-11-17 > 15:14:46',1447794886,1,'') failed. ERR=Table 'bareos.Job' doesn't exist > > Did the make table script fail? > > Logging into MySQL and showing all the tables in the bareos DB, I have: > > mysql> show tables; > +--------------------+ > | Tables_in_bareos | > +--------------------+ > | BaseFiles | > | Client | > | Counters | > | DeviceStats | > | File | > | Filename | > | JobMedia | > | JobStats | > | Location | > | MediaType | > | NDMPJobEnvironment | > | NDMPLevelMap | > | Path | > | PathHierarchy | > | PathVisibility | > | Pool | > | RestoreObject | > | Status | > | Storage | > | TapeAlerts | > | UnsavedFiles | > | Version | > +--------------------+ > > Clearly the Media and Jobs tables are missing and I have no idea what other > tables may be missing. > > What can I do to fix up the MySQL tables? I followed the MySQL instructions > at > http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-400002.4.2 > including supplying bareos with a password. All of which worked except for > the above falures when running the make_bareos_table script. > > Thanks for your help! > -- Stephan Dühr [email protected] Bareos GmbH & Co. KG Phone: +49 221-630693-90 http://www.bareos.com Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646 Komplementär: Bareos Verwaltungs-GmbH Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz, M. v. Wieringen -- You received this message because you are subscribed to the Google Groups "bareos-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
